![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
codeforce练习题
m0_47943920
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #649 (Div. 2)。A。
题意t种情况,数组a的长度为n,然后数组的和不能被n整除,问a的长度,可以从前或者后面进行计算。 题解:两个思路:1.使用双指针,代码如下: #include <iostream> #include <algorithm> using namespace std; const int maxn = 1e5 + 10; int main(){ int a[maxn],b[maxn]; int t,x,n; cin>>t; while(t--){ int原创 2020-06-14 10:03:12 · 135 阅读 · 0 评论 -
codeforce #648.B
题意:给你长度为n 的 数组,数组的元素除了值以外还有种类(0,1),你可以进行操作:选择 种类不同的两个 元素然后交换 他们的位置,如果只有一种元素,则 判断是否递减即可 #include <iostream> using namespace std; const int N = 5e2+10; int a[N], b[N]; int main() { ios::sync_with_stdio(false); cin.tie(0), cout.tie(0); int原创 2020-06-08 19:25:32 · 106 阅读 · 0 评论 -
codeforce #648A
题意:给了m*n的矩阵然后两个人统计有多少空行和空列。 #include <iostream> using namespace std; const int N = 55; int a[N][N], r[N], c[N]; int main() { ios::sync_with_stdio(false); cin.tie(0), cout.tie(0); int T, n, m; cin>>T; while(T--){ cin>>n>原创 2020-06-08 19:19:43 · 97 阅读 · 0 评论