![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Codeforces
文章平均质量分 71
wang3312362136
这个作者很懒,什么都没留下…
展开
-
[Codeforces Round #452 (Div. 2)] Splitting in Teams
There were n groups of students which came to write a training contest. A group is either one person who can write the contest with anyone else, or two people who want to write the contest in the same原创 2017-12-19 17:20:17 · 457 阅读 · 0 评论 -
[Codeforces Round #452 (Div. 2)] Dividing the numbers
Petya has nn integers: 1, 2, 3, ..., n1, 2, 3, ..., n. He wants to split these integers in two non-empty groups in such a way that the absolute difference of sums of integers in each group is as small原创 2017-12-19 17:37:16 · 251 阅读 · 0 评论 -
Codeforces Round #462 (Div. 2)
由于太菜只能做出前两题…… A. A Compatible Pair 思路:暴力枚举。 代码: #include <cstdio> #include <algorithm> const int maxn=100; const long long inf=0x3f3f3f3f3f3f3f3f; int read() { int x=0,f=1; cha...原创 2018-02-15 09:51:37 · 181 阅读 · 0 评论 -
Educational Codeforces Round 41 (Rated for Div. 2)
比赛链接 http://codeforces.com/contest/961 A. Tetris 题目大意 长度为nnn的序列,操作为:在aiaia_i位置+1,如果序列的每个位置都有值,那么每个位置减一同时答案加1,重复操作指导有一个位置为0为止。重复mmm次。 思路 这道题……按题目过程模拟。O(nm)O(nm)O(nm)。 也可以将所有的操作都处理完后一次回答询问。...原创 2018-04-06 17:57:55 · 115 阅读 · 0 评论 -
Codeforces Round #487 (Div. 2)
比赛链接 http://codeforces.com/contest/989 吐槽? 公告写的好,故事写的好啊。 两题滚粗,凭借着手速与hack +1:-1成功涨了一波rating……还是我太菜了。 下面只有ABC三题题解,想找DE题解的dalao可以换一篇了,为了保持良好的阅读体验,代码都放在最后面。 A. A Blend of Springtime 题目大意 在一个...原创 2018-06-13 21:03:17 · 115 阅读 · 0 评论 -
Codeforces Round #499 (Div. 2)
比赛链接 https://codeforces.com/contest/1011 题解 A. Stages 题目大意 给定一个长度为nnn的字符串SSS,找出kkk个在SSS中出现的字母,使得这kkk个字母在字母表中不相邻。如果不存在输出−1−1-1,如果存在输出最小的“重量”之和,其中a的重量为1,b的重量是2…… 1≤k≤n≤501≤k≤n≤501\leq k\leq ...原创 2018-08-09 21:57:14 · 107 阅读 · 0 评论 -
Educational Codeforces Round 48 (Rated for Div. 2) (ABCD题解)
比赛链接 https://codeforces.com/contest/1016 A. Death Note 题目大意 有一本死亡笔记,一页可以写mmm个名字。现在你要写nnn天,每天写aiaia_i个名字,问每一天翻了多少页,写满了一页就必须翻一页。 题解 暴力模拟,O(n)O(n)O(n)。 B. Segment Occurrences 题目大意 给一个串SS...原创 2018-08-15 12:44:45 · 182 阅读 · 0 评论 -
Codeforces Round #504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) ABCDEF题解
比赛链接 https://codeforces.com/contest/1023 ABCDEF题解 A. Single Wildcard Pattern Matching 题目大意 给两个串S,TS,TS,T,TTT只有小写字母,SSS除了小写字母还有最多一个*字符,*字符能够匹配最多一个字符和空串。求SSS能否匹配TTT,|S|,|T|≤2×105|S|,|T|≤2×105|S...原创 2018-08-18 21:29:50 · 172 阅读 · 0 评论 -
Educational Codeforces Round 50 (Rated for Div. 2) 全题解
比赛链接 https://codeforces.com/contest/1036 A. Function Height 题目大意 nnn个点,kkk次操作,每次可以使一个点+1,求最终nnn个点的最大值。 1≤n,k≤10181≤n,k≤10181\leq n,k\leq 10^{18} 题解 答案就是 ⌈kn⌉⌈kn⌉ \lceil\frac{k}{n}\rceil ...原创 2018-09-11 10:57:23 · 224 阅读 · 0 评论