AtCoder 随笔分类 -AtCoder [AtCoder] E - Bowls and Beans 摘要:Problem Link: https://atcoder.jp/contests/abc404/tasks/abc404_e Greedy For position i, if there exists a postion j in [i - C[i], i - 1], where A[j] >阅读全文...
intdu[N];intf[N];intfind(intx){if(f[x]==x)returnx;returnf[x]=find(f[x]);}/*1. 判断给定图,是否联通 dfs并查集2. 判断每个点的度数是不是2*/intmain(){intn,m;cin>>n>>m;for(inti=1;i<=n;i++)f[i]=i;for(inti=1;i<=m;i++){intu,v;cin>>u>>v;intfu=find(u),fv...
abc295 d,状态压缩。类似前缀和,记录整体的状态,然后能和以当前位为结尾的就是前面的相同的状态。 由于没想到状态压缩,转移认为时间不够,然后就寄了。f,枚举/数位DP,可以直接枚举在哪个位置,然后把前面和后面的稍做处理就可以得出答案。用string的库函数stoll会很方便。 g,一开始因为都是连向比自己序号大的点...
ABC404 因为放学了最后一题没写完/ll ABC389 G - Odd Even Graph ABC391 G - Many LCS ABC392(Unrated) F - Insert G - Fine Triplets ABC394 E - Palindromic Shortest Path G - Dense Buildings ARC194 C - Cost to Flip D - Reverse Brackets E - Swap 0^X and 1^Y ABC397 D - Cubes G ...
AtCoder Beginner Contest 406 实况 ABCDEF wmrqwq 203 0 AtCoder Beginner Contest 405 实况 ABCDEF wmrqwq 208 0 Codeforces Round 453 (Div. 2) vp 录像 +15min AK wmrqwq 225 0 AtCoder Beginner Contest 398 A~F 讲解 wmrqwq 280 0 AtCoder Beginner Contest 404 实况 ABCDEFG wmrqwq 171 0...
Atcoder ABC401_E 08:45 Atcoder ABC401_F 11:07 Atcoder ABC402_C 05:40 Atcoder ABC402_D 05:43 Atcoder ABC402_E 15:11 Atcoder ABC402_F 12:20 Atcoder ABC403_C 04:22 Atcoder ABC403_D 09:08 Atcoder ABC403_E 10:12 Atcoder ABC403_F 08:26 Atcoder ABC404_C ...
题目地址:https://atcoder.jp/contests/abc404/tasks ABC404题解及参考程序(文字版) === A参考代码 #include<bits/stdc++.h> usingnamespacestd; charstr[30];boolb[30];// b[0]: a 是否出现过,b[i]: 'a'+i intmain{scanf("%s",str);intn =strlen(str);for(inti...
AtCoder Beginner Contest 402 A-F 枫落· 发表于Atcoder abc系列题解 「C语言迷惑行为大赏」这些代码你绝对猜不到结果! C语言编... · 发表于C/C++编程学习殿堂 AtCoder Beginner Contest 404 A-G 枫落· 发表于Atcoder abc系列题解 App 内打开 欢迎参与讨论 1 1 ...
Is that intentional, or is my implementation stupid? https://atcoder.jp/contests/abc184/submissions/18330299 → Reply dush1729 4 years ago, # ^ | 0 Double is sufficient. You got AC because you fixed issue in line 67, 68 and 79. Accepted Code → Reply ...
Contest URL:https://atcoder.jp/contests/abc249 Start Time:http://www.timeanddate.com/worldclock/fixedtime.html?iso=20220423T2100&p1=248 Duration: 100 minutes Number of Tasks: 8 Writer:Kodaman,PCTprobability,m_99,nok0 Tester:physics0523,Nyaan ...