AtCoder Beginner Contest 221 A~E题解 目录 A - Seismic magnitude scales B - typo C - Select Mul D - Online games E - LEQ 发挥比较好的一场,就来搓篇题解。 F 没时间写了,最后只是口胡了一下(还不是很对,改完后放上)。 比赛传送。 A - Seismic magnitude scales 给你A,BA,B,表示两场地震...
题意:给你nn条线段,每条线段的左端点AiAi与覆盖长度BiBi已知,现让你对每个k∈[1,n]k∈[1,n],输出有多少个点被覆盖了kk次。 题目分析:如果是暴力做法怎么做?对每条线段[Ai,Ai+Bi−1][Ai,Ai+Bi−1]内的点覆盖次数+1+1,最后扫一遍整个序列统计每个kk值对应的答案。显然无论是时间还是空间都不允许...
Atcoder Beginner contest 256题解(A-G) A.2^N直接输出好了 #include <bits/stdc++.h> using namespace std; using ll = long long; #define fi first #define se second #define pb push_back #define sz(x) ((int)x.size()… syyy AtCoder Beginner Contest 403 A-G 简易题解,如果题...
AtCoder Beginner Contest 221-ABCD WorrywartsL As no way. 来自专栏 · 孩子学习ABC A - Seismic magnitude scales Analysis 根据题意,求出32A−B即可。 Code int a ,b; cin >> a >> b; int res = 1; for(int i = 0; i < a - b; i++)res *= 32; cout<< res<< '\n'; B - ...
AtCoder Beginner Contest 221 E - LEQ (计数,线段树) 题意:给你一个长度为\(n\)的序列,问你有多少子序列满足第一个元素不大于最后一个元素。 题解:假设子序列的尾元素在原序列的位置为\(j\),如果\(i\ (i<j)\)位置满足\(A[i]\le A[j]\),那么,\([i,j]\)的合法子序列个数为\(2^{j-i...
AtCoder Beginner Contest 221 题解 题意: 求\((a-b)^{32}\) 。 思路: 直接求即可。 B:typo 题意: 定义一种操作为交换两个字符串相邻的字符,问是否能做到至多进行一次操作使得两个字符串相等。 \(len\leq1e5\) 。 思路: 检查两个字符串对应位不相等的个数,如果不为 \(0\) 或 \...
·AtCoder Beginner Contest (ABC) 这是最频繁且最简单的入门赛,通常情况下每月至少举行2次。2019年4月27日(含)之前,每场比赛共4题,时长100分钟,满分1000分且Rating超过1199的选手不计Rating值。自2019年5月19日起改版升级为6道题目,时长不变,满分2100分且Rating值超过1999的选手不计Rating值。改版之后比赛质量...
AtCoder Beginner Contest 242 F(组合数学) https://zhuanlan.zhihu.com/p/476659976 AtCoder Beginner Contest 242 补题记录 https://blog.csdn.net/bunny_1024/article/details/123305209 零点工作室暑假集训(AtCoder--ABC242) https://blog.csdn.net/weixin_73807663/article/details/131714591 ...
最近总感觉有点惆怅,打完之后一直在发懵也没马上写题解,不知道在干嘛qwq A.Tomorrow 模拟即可。 inlinevoidqfl_zzz(){ll m=read(),d=read();ll Y=read(),M=read(),D=read();++D;if(D>d)++M,D=1;if(M>m)++Y,M=1;writet(Y),writet(M),writen(D);} ...
Did you enjoy the AtCoder Beginner Contest 128? A Japanese editorial is already out, but unfortunately there is no English editorial, so I translated it into English experimentally. Note that this is an unofficial one; AtCoder has no responsibility for this editorial. Also, I didn't do ...