D - Decrease (Contestant ver.) Time limit : 2sec / Memory limit : 256MB Score : 600 points Problem Statement We have a sequence of length N consisting of non-negative integers. Consider performing the following operation on this sequence until the la…
从n个t变化到n个t-1,恰好要n步,并且其中每一步的max值都>=t,所以把50个49当成最终局面,从这里开始,根据输入的K计算初始局面即可. #include<cstdio> #include<iostream> using namespace std; typedef long long ll; ll K; int main(){ cin>>K; int n=50; printf("%d\n",n); ll a=K/(ll)n; ll b…
C - Cat Snuke and a Voyage Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement In Takahashi Kingdom, there is an archipelago of N islands, called Takahashi Islands. For convenience, we will call them Island 1, Island 2, ...,…
A - ABCxxx Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement This contest, AtCoder Beginner Contest, is abbreviated as ABC. When we refer to a specific round of ABC, a three-digit number is appended after ABC. For example,…
A - ABCxxx 题意: 给出n,输出“ABCn”就可以了,纯水题. B - Break Number 题意: 给出n,找出从1到n的闭区间内能够被2整除最多次的数. 思路: 直接模拟. 代码: #include <stdio.h> #include <string.h> int main() { int n; scanf("%d",&n); ; ; ;i <= n;i++) { int tmp = i; ; == ) { tmp /= ; c…
D - Decrease (Contestant ver.) Time limit : 2sec / Memory limit : 256MB Score : 600 points Problem Statement We have a sequence of length N consisting of non-negative integers. Consider performing the following operation on this sequence until the la…
E - Decrease (Judge ver.) Time limit : 2sec / Memory limit : 256MB Score : 600 points Problem Statement We have a sequence of length N consisting of non-negative integers. Consider performing the following operation on this sequence until the largest…
每次将最大的数减到n以下,如此循环直到符合题意. 复杂度大概是n*n*log?(?). #include<cstdio> #include<iostream> #include<algorithm> using namespace std; int n; typedef long long ll; ll ans,a[60]; int main(){ scanf("%d",&n); for(int i=1;i<=n;++i){ cin&g…
Tasks - Panasonic Programming Contest 2022(AtCoder Beginner Contest 251)\ D - At Most 3 (Contestant ver.) 题意: 每次给定一个n,求出一个序列,保证每次可以从序列中选取最多三个数,来构成1-n中的所有数字,序列最大长度300. 题解; 可以直接求一个构成1-1e6的序列,开始时思考的二进制,但感觉很难控制在300以内,所以可以分成三份,每份100个,其实100个的话会有重复的. 三份分别是…
A - Happy Birthday! Time limit : 2sec / Memory limit : 1000MB Score: 100 points Problem Statement E869120's and square1001's 16-th birthday is coming soon.Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan-shaped pieces. E869…