![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Codeforces
Codeforces记录
npucfy
窝真的...很菜
展开
-
Codeforces Global Round 12 A-D题解
A题意给你一个字符串aaa,重新排列其中的元素,使aaa中不包含"trygub"这个子序列。分析将aaa中包含的子序列中的666个字符倒排即可。代码#include<bits/stdc++.h>#define ll long long#define FULL(x,y) memset(x,y,sizeof(x))#define pb push_backusing namespace std; string str="bugyrt";int t,n;string s;原创 2020-12-16 15:43:55 · 215 阅读 · 0 评论 -
Codeforces Round #683 (Div. 2) A-D题解
A题意给你nnn包糖果,第iii包里面有iii颗糖果,第iii次操作可以选定其中一包糖果,将其余包的糖果数加iii,输出使所有包的糖果数相等的最少操作次数和每次操作的索引值。分析第iii次操作将除了选定包的糖果数加iii等价于将选定包的糖果数减去iii,因此第1次操作选1,第二次选2,…即可。代码#include<bits/stdc++.h>#define ll long long#define FULL(x,y) memset(x,y,sizeof(x))#define pb原创 2020-12-14 21:59:37 · 146 阅读 · 0 评论 -
Codeforces Round #682 (Div. 2) A-D题解
A题意给定一个nnn,构造一个长度为nnn的数组aaa,满足:1.aaa的任意子数组的和均能被其长度整除;2.1≤ai≤1001 \le {a_i} \le 1001≤ai≤100。思路方法很多,直接输出长度为nnn的全1数组即可。代码#include<bits/stdc++.h>#define FULL(x,y) memset(x,y,sizeof(x))#define ll long long#define pb push_backusing namespace std原创 2020-12-13 20:52:17 · 77 阅读 · 0 评论