- 博客(4)
- 收藏
- 关注
原创 7.6-7.7训练总结
map的使用和set的使用。 1.在19年的致新杯中, a佬tql,又是ak又是first blood,按照每题first blood都能得气球的奖励,a佬各个颜色的气球得了一大堆,a佬想知道得到的哪个颜色的气球最多。 #include <string.h> #include <iostream> #include<string.h> #include<algorithm> #include<stdio.h> using namespace.
2020-07-07 18:30:10 189
原创 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 145
原创 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 116
原创 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 107
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人