摘要:
输入输出 inline int read(){ int s = 0, w = 1; char c = getchar(); for (; !isdigit(c); c = getchar()) if (c == '-') w = -1; for (; isdigit(c); c = getchar( 阅读全文
摘要:
Codeforces Round #690 (Div. 3) A #include<bits/stdc++.h> using namespace std; #pragma GCC optimize(2) typedef long long ll; typedef unsigned long long 阅读全文
摘要:
Educational Codeforces Round 100 (Rated for Div. 2) A #include<bits/stdc++.h> using namespace std; #pragma GCC optimize(2) typedef long long ll; typed 阅读全文
摘要:
Codeforces 414-B. Mashmokh and ACM 传送门 是一道数位dp,我还是dp太菜了,多做题吧,具体的写在code里面了 #include<bits/stdc++.h> using namespace std; #pragma GCC optimize(2) typedef 阅读全文
摘要:
传送门 还是比较明显的线段树的操作 #include <bits/stdc++.h> using namespace std; const int N = 2e6 + 10; int a[N]; int tn, m, n; struct stree { int id, num; } tree[N < 阅读全文
摘要:
Educational Codeforces Round 96 (Rated for Div. 2) A-Number of Apartments #include<bits/stdc++.h> using namespace std; #pragma GCC optimize(2) typedef 阅读全文
摘要:
2019-2020 ICPC Northwestern European Regional Programming Contest (NWERC 2019) I-Inverted Deck #include<bits/stdc++.h> using namespace std; const int 阅读全文
摘要:
B. Brexit Negotiations 得反向建图,正向建图,使用优先队列,在权值相同的情况下,不同的选择会对后续的结果产生影响,而反向建图,从结果出发则可以避免这个影响。 以后得习惯逆向思维,反向建图会解决很多问题 #include<bits/stdc++.h> using namespac 阅读全文
摘要:
Baby name #include<bits/stdc++.h> using namespace std; string a, b; string solve(string x) { int len = x.size(); string t1, t2; // t1 += x[0]; for (in 阅读全文
摘要:
Codeforces Round #665 (Div. 2) 题解 A. Distance and Axis \[ \begin{cases} x+y=n\\ x-y=k\\ \end{cases}\\ \Rightarrow \begin{cases} x=\tfrac{n+k}{2}\\ y=\ 阅读全文