A - +3 +5 +7(思维)首先 (+3,+5,+7) 等价于 (-2,0,+2) ,因为这并不会改变数的相对大小关系,每执行一次 (-2,0,+2) 数的总和不变,所以 3 | (x_1 + x_2 + x_3) ,并且可以发现操作一次后数的奇偶性不会发生改变,…
#include <bits/stdc++.h> #define x first #define y second #define endl '\n' #define int long long #define NO {puts("NO"); return;} #define YES {puts("YES"); return;} using namespace std; typedef long long ll; typedef pair<int, int> PII; const int MOD = 1e9 + 7; const...
然后嗯做就可以了,懒得再写了,具体看代码吧。 参考代码 #include<vector>#include<iostream>#include<algorithm>usingi64 =longlong;usingvint = std::vector<int>;usingPII = std::pair<int,int>;intmain(void){//Think twice, code once.std::ios::sync_with_stdio(false); i64 a[3]; std::cin >...
E:用二进制表示放的数字,然后状压$DP$。 F:$biset$优化$DP$预处理,乱搞贪心。 ARC 059 D:傻题,存在长的合法子串就一定会存在短的。 E:前缀和优化$DP$。 F:每个长度为$len$的串出现的概率是相同的,求到长度为$len$的方案数然后除$2^{len}$。 ARC 060 D:对$b$分大于根号和小于根号讨论。 E:倍增...
We will hold AtCoder Regular Contest 151. Contest URL:https://atcoder.jp/contests/arc151 Start Time:http://www.timeanddate.com/worldclock/fixedtime.html?iso=20221016T2100&p1=248 Duration: 120 minutes Number of Tasks: 6 Writer:leaf1415 ...
观察性质暴力 #include<bits/stdc++.h> usingnamespacestd; #definepb push_back #defineendl'\n' #defineLL long long constintN =5e5+10; intn, a[N], l[N], r[N]; LL pre[N], suf[N], b[N]; voidsolve(){ cin >> n; for(inti =1; i <= n; i++) { ...
164 -- 1:43:11 App [6/8] AtCoder Beginner Contest 286 (unrated) 181 -- 27:25 App [6/6] VP AtCoder Beginner Contest 166 (随机 VP) 441 1 2:00:59 App [5/7] Educational Codeforces Round 142 (1660 ⭜ 1889) 468 -- 42:43 App AtCoder Beginner Contest 334 A 至 G 題...
We will hold AtCoder Regular Contest 107. Contest URL: https://atcoder.jp/contests/arc107 Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20201031T2100&p1=248 Duration: 100 minutes Number of Tasks: 6 Writer: maroonrk, yosupo, sigma425 Tester: maroonrk, yosupo, sigma...
AtCoder Regular Contest E - Or Plus Max Time limit : 2sec /Memory limit : 1024MB Score :700points Problem Statement There is an integer sequence of length2N:A0,A1,…,A2N−1. (Note that the sequence is0-indexed.) For every integerKsatisfying1≤K≤2N−1, solve the following ...
AtCoder Regular Contest 137 每场一个多项式 气死了【dls】【算法比赛】 379 -- 35:24 App AtCoder Regular Contest 140 A-D 讲解 163 -- 2:39:35 App Codeforces Round #787 (Div. 3) 现场 130 -- 1:09:53 App Codeforces Round #790 (Div. 4) 现场实况 172 -- 2:59:16 App Educational...