该文被密码保护。 阅读全文
posted @ 2019-08-29 10:13 19992147 阅读(3) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; int main() { int T; scanf("%d", &T); while(T--) { system("data > input.txt"); system("a+b < input.txt > 1 阅读全文
posted @ 2017-04-22 11:53 19992147 阅读(913) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-04-14 20:15 19992147 阅读(12) 评论(0) 推荐(0) 编辑
摘要: A[CF1492A(800)] 计算离$a$,$b$,$c$的倍数最近是多少即可。 #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); in 阅读全文
posted @ 2021-08-13 08:26 19992147 阅读(51) 评论(0) 推荐(0) 编辑
摘要: A[CF1497A(800)] 可以发现从小到大排序后$mex$最大,于是排序后统计即可。 #include <bits/stdc++.h> using namespace std; int main() { int T; cin >> T; while (T --) { int N; cin >> 阅读全文
posted @ 2021-08-12 07:28 19992147 阅读(38) 评论(0) 推荐(0) 编辑
摘要: A[HDU7053(800)] #include<cstdio> const double eps = 1e-4; int T; double p,q; void sol() { scanf("%lf%lf",&p,&q); if(q>=p)puts("N0 M0R3 BL4CK 1CE TEA!" 阅读全文
posted @ 2021-08-11 10:00 19992147 阅读(45) 评论(0) 推荐(0) 编辑
摘要: A[CF1208A(900)] 由于异或的性质,容易找到序列出现$%3$的规律。 #include <bits/stdc++.h> using namespace std; int main() { int T; cin >> T; while (T --) { int A, B, N; cin > 阅读全文
posted @ 2021-08-09 21:08 19992147 阅读(54) 评论(0) 推荐(0) 编辑
摘要: A[CF1155A(1000)] 枚举相邻两项,如果存在逆序对则可以。 #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; c 阅读全文
posted @ 2021-08-05 21:04 19992147 阅读(60) 评论(0) 推荐(0) 编辑
摘要: A[ABC172B(20)] 计算多少个对应的位置不同即可。 #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string s, t; 阅读全文
posted @ 2021-08-04 20:51 19992147 阅读(60) 评论(0) 推荐(0) 编辑
摘要: A[CF1025A(800)] 观察一下容易发现只要存在两个不同字母即可。 #include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; string S; cin >> S; if (N == 1) { co 阅读全文
posted @ 2021-08-04 20:39 19992147 阅读(58) 评论(0) 推荐(0) 编辑
摘要: A[CF1552A(800)] 本质上是求序列的不动点个数,也就是和最终排好序的序列相同的地方。 #include <bits/stdc++.h> using namespace std; int main() { int T; cin >> T; while (T --> 0) { int N; 阅读全文
posted @ 2021-08-02 20:52 19992147 阅读(67) 评论(0) 推荐(0) 编辑
摘要: A[HDU6950(1200)] 可以发现本质上相当于把$\frac{N-1}{2}$所有空着的为$0$的位变成了$1$,求出最高位即可算出。 #include <bits/stdc++.h> using namespace std; int main() { int T; cin >> T; wh 阅读全文
posted @ 2021-07-29 21:34 19992147 阅读(47) 评论(0) 推荐(0) 编辑
摘要: A[HDU6954(1500)] 可以通过贪心的思想发现每个数连向自己的因数最优,那么只有质数是特殊的,所以筛出质数单独统计即可。 #include <bits/stdc++.h> using namespace std; vector<bool> GetPrime(int n) { vector< 阅读全文
posted @ 2021-07-28 20:50 19992147 阅读(78) 评论(0) 推荐(0) 编辑