Codeforces Round 991 (Div. 3) 2024.12.6 rank 1559 rating 1314->1381 A 模拟 B 给定一数组,你可以任意操作:a[i-1]+1&&a[i+1]-1 或者 a[i-1]-1&&a[i+1]+1。问
99的倍数的数位之和也为99的倍数. 分析可得, 只有2,32,3可以进行一次平方, 且有意义. 在mod9mod9意义下, 对于2: 一次平方使得总和+(4−2=2)+(4−2=2). 多次相加, 结果为:{2,4,6,8,1,3,5,7}{2,4,6,8,1,3,5,7},88为周期. 对于3: 一次平方使得总和+(9−3=6)+(9−3=6)....
int t=i-'0';sum+=t;sum%=9; if(t<=3)ok[t]++; } if(sum==0){ {cout<<"YES\n";return;} } int need=9-sum; vector<int>q; ok[2]=min(ok[2],9ll);ok[3]=min(ok[3],9ll); for(int i=0;i<=ok[2];i++){ for(int j=0;j<=ok[3];j++){ int res=sum+i*2+j*...
I have received a plagiarism notice for my solution to problem 2050D in Codeforces Round 991 Div 3. I was surprised to see my submission flagged, as I wrote the solution independently and based on my own understanding of the problem. I would appreciate it if you could kindly review my cas...
转移为dp_{i,j+x}\leftarrow dp_{i-1,j},其中x=s_{i}是这一位的数码,如果x为 2 或 3,需要额外转移dp_{i,j+x^{2}}\leftarrow dp_{i-1,j}。 时间复杂度\Theta(n)。 #include<bits/stdc++.h>usingnamespacestd;intmain(){intt;cin>>t;while(t--){strings;cin>>s;array<bool,9>dp...
Please do not use an integer or, a long to store it, as it will round off to undesired values, due to cyclic nature of these data types in C++. Use a string to take the input instead. → Reply hrszo 3 months ago, # ^ | 0 damn I mistook the range for the length of the...
Codeforces Round 991 (Div. 3)ABCDE+赛后F, 视频播放量 110、弹幕量 0、点赞数 3、投硬币枚数 0、收藏人数 0、转发人数 0, 视频作者 fang__baby, 作者简介 ,相关视频:Codeforces Round 986 (Div. 2)(ABC),Codeforces Round 981 (Div. 3)(A-F),CodeTON Round 9 (Div
———B和 C 都非常有趣,从中学到了很多。 ZXP4 活跃吧友 4 修改一下计划。星期一、五:D3 A-E星期三、日:ABC A-D星期二、四、六:D2 A-CABC 相比 D3 更加 educational,可以学到很多经典的技巧,比较适合我这种新手。 ZXP4 活跃吧友 4 今日:Codeforces Round 991 (Div. 3) A-E 登录百度...
简介:Codeforces Round 883 (Div. 3) # A. Rudolph and Cut the Rope 只需要按照钉子距离的高度$a_{i}$和绳子的长度$b_{i}$的差值进行排序即可 代码 ``` int n; pii a[N]; bool cmp(pii a,pii b) { return a.x-a.y<b.x-b.y; ...
Codeforces Round #634 (Div. 3) 1335B - Construct the String - Accepted Codeforces Global Round 5 - 1/9 1237A - Balanced Rating Changes - Accepted 1237B - Balanced Tunnel - Accepted 1237C1 - Balanced Removals (Easier) - Accepted 1237C2 - Balanced Removals (Harder) - Wrong answer Educati...