![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
cf
文章平均质量分 64
andyc_03
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #698 (Div. 2)
A 最长连续个数 代码 #include<bits/stdc++.h> using namespace std; const int maxn=105; int n,a[maxn]; int main() { // freopen("a.in","r",stdin); // freopen("a.out","w",stdout); int t; scanf("%d",&t); while(t--) { scanf("%d",&n); in..原创 2021-01-30 20:21:55 · 84 阅读 · 0 评论 -
Codeforces Round #696 (Div. 2)
A 这道题目是很明显的贪心,因为位数多的数字一定更大,所以我们可以记录前一位数字,通过当前位置的配对,尽量保证和上一位不同 代码 #include<bits/stdc++.h> using namespace std; int n; int main() { // freopen("a.in","r",stdin); // freopen("a.out","w",stdout); int t;scanf("%d",&t); while(t--) { ..原创 2021-01-22 13:13:42 · 69 阅读 · 0 评论 -
Codeforces #663 (Div. 2) A-D
观察可以发现无论怎么枚举i和j,都不会使得答案小于个数,所以只要输出数组即可 #include<bits/stdc++.h> using namespace std; int t,n; int main() { scanf("%d",&t); while(t--) { scanf("%d",&n); for(int i=1;i<=n;i++) printf("%d ",i); printf("\n"); } return 0; } ...原创 2020-08-16 17:24:39 · 145 阅读 · 0 评论