摘要: 输入输出 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( 阅读全文
posted @ 2020-12-22 23:50 0xDkXy_DWM 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-12-19 00:30 0xDkXy_DWM 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-12-19 00:18 0xDkXy_DWM 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Codeforces 414-B. Mashmokh and ACM 传送门 是一道数位dp,我还是dp太菜了,多做题吧,具体的写在code里面了 #include<bits/stdc++.h> using namespace std; #pragma GCC optimize(2) typedef 阅读全文
posted @ 2020-10-21 17:44 0xDkXy_DWM 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 传送门 还是比较明显的线段树的操作 #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 < 阅读全文
posted @ 2020-10-16 10:56 0xDkXy_DWM 阅读(64) 评论(0) 推荐(0) 编辑
摘要: Educational Codeforces Round 96 (Rated for Div. 2) A-Number of Apartments #include<bits/stdc++.h> using namespace std; #pragma GCC optimize(2) typedef 阅读全文
posted @ 2020-10-12 23:33 0xDkXy_DWM 阅读(201) 评论(0) 推荐(2) 编辑
摘要: 2019-2020 ICPC Northwestern European Regional Programming Contest (NWERC 2019) I-Inverted Deck #include<bits/stdc++.h> using namespace std; const int 阅读全文
posted @ 2020-10-06 23:40 0xDkXy_DWM 阅读(192) 评论(0) 推荐(0) 编辑
摘要: B. Brexit Negotiations 得反向建图,正向建图,使用优先队列,在权值相同的情况下,不同的选择会对后续的结果产生影响,而反向建图,从结果出发则可以避免这个影响。 以后得习惯逆向思维,反向建图会解决很多问题 #include<bits/stdc++.h> using namespac 阅读全文
posted @ 2020-10-05 21:25 0xDkXy_DWM 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-10-05 21:12 0xDkXy_DWM 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 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=\ 阅读全文
posted @ 2020-08-23 00:21 0xDkXy_DWM 阅读(202) 评论(0) 推荐(0) 编辑