11 2022 档案
摘要:##A. Technical Support #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> pll; const ll N=2e5+10; const ll inf=1e1
阅读全文
摘要:##F - Shiritori 题解:n最大16,所以可以状态压缩,相当于n个点的带权有向图。 dp[i][j]表示当前状态为i,j结尾的情况,其中dp[i][j]=1表示First赢,0为second赢,如果一个字符串s[i],第一个字符为j,那么如果dp[k][s[i].back()]为1那么,
阅读全文
摘要:##A. Oops, It’s Yesterday Twice More 题解:分成四个区域,然后将所有的点先集中到对应取余的角落,然后再移动到终点 #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef
阅读全文
摘要:##A-切蛋糕的贝贝 题解:分成1:1:4:5:1:4份,每次都要沿着两点连线切割,所以n要是16的倍数 #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> pll; const
阅读全文
摘要:Dashboard - Codeforces Round #831 (Div. 1 + Div. 2) - Codeforces A. Factorise N+M 题解:奇数加3,偶数加2凑成偶数 #include<bits/stdc++.h> using namespace std; typede
阅读全文