
Codeforces
心悦灵溪
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces 1325B CopyCopyCopyCopyCopy
传送门:Codeforces 1325B 按照题意,我们可以无限复制所给的字符串,要求我们找最长递增子序列的长度。结合样例,我们不难发现,最长的长度就是将所给数组排序、去重后的长度。所以用一个 set 存数组即可。 AC代码: #include<iostream> #include<algorithm> #include<cstring> #inclu...原创 2020-03-15 00:33:48 · 776 阅读 · 0 评论 -
Codeforces 1325A EhAb AnD gCd
传送门:Codeforces 1325A 要满足 GCD(a,b)+LCM(a,b)=x ,只要 a=1,b=x-1 即可。 AC代码: #include<iostream> #include<algorithm> #include<cstring> #include<cstdio> #include<cmath> #defin...原创 2020-03-15 00:22:52 · 450 阅读 · 0 评论 -
Codeforces 1312B Bogosort
传送门:Codeforces 1312B B. Bogosort You are given an array a1,a2,…,an. Array is good if for each pair of indexes i<j the condition j−aj≠i−ai holds. Can you shuffle this array so that it becomes go...原创 2020-03-11 18:38:20 · 506 阅读 · 0 评论 -
Codeforces 1312A
Codeforces 1312A 签到题,当 n 可以被 m 整除时,输出 YES,否则 NO。 AC代码: #include<iostream> #include<algorithm> #include<cstring> #include<cstdio> #include<cmath> #define ll long long #d...原创 2020-03-11 17:19:38 · 186 阅读 · 0 评论