#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 >> a[0] >> a[1] >> a[2]; i64 x = a[0] ...
E:用二进制表示放的数字,然后状压$DP$。 F:$biset$优化$DP$预处理,乱搞贪心。 ARC 059 D:傻题,存在长的合法子串就一定会存在短的。 E:前缀和优化$DP$。 F:每个长度为$len$的串出现的概率是相同的,求到长度为$len$的方案数然后除$2^{len}$。 ARC 060 D:对$b$分大于根号和小于根号讨论。 E:倍增...
AtCoder AtCoder Regular Contest 194 (Div. 2). A - Operations on a Stack 原题链接简单 作者: Flor_7 , 2025-03-10 09:10:26 ·湖北 , 所有人可见 , 阅读 8 0 对于一个连续的负数序列,当个数为偶数时,可以全部消去;当个数为奇数时,可以选择位置1,3,5,…中最大的负数留下。这样原数组...
We will hold estie Programming Contest 2024 (AtCoder Regular Contest 188). Contest URL: https://atcoder.jp/contests/arc188 Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20241123T2100&p1=248 Duration: 120 minutes Number of Tasks: 5 Writer: riano_ Tester: Nyaan, ...
观察性质暴力 #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++) { ...
We will hold estie Programming Contest 2024 (AtCoder Regular Contest 188). Contest URL: https://atcoder.jp/contests/arc188 Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20241123T2100&p1=248 Duration: 120 minutes Number of Tasks: 5 Writer: riano_ Tester: Nyaan, ...
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 題...
AtCoder Beginner Contest 399(C-F详细题解) C 思路:作为一个简单无向图,有 n 个点只能有 n-1 条边,那我们只需要统计不同连通图上的点计算出所需的边即可,最后就是总边数减去所需的边即可。 代码:vector<vector<int>>… 秋日薄雾 AtCoder Beginner Contest 401 A-G 简易题解,如果题解...
AtCoder Regular Contest 160 (A - C) Raven03 CP 考研 目录 收起 A - Reverse and Count(思维) B - Triple Pair(整除分块) C - Power Up(dp) A - Reverse and Count(思维)因为是字典序,所以从最小的 L 开始考虑,固定 L ,考虑 R
AtCoder Regular Contest 123 (A~C 三道好题),比赛链接:HereA-ArithmeticSequence(good)注意细节intmain(){cin.tie(nullptr)->sync_with_stdio(false);lla,b,c;cin>>a>>b>>c;llx=2*b-a...