codeforces
erge1998
华南师范大学计算机学院2016届学生
展开
-
Educational Codeforces Round 60 D. Magic Gems
易得递推式为f[i]=f[i-1]+f[i-M] 最终答案即为f[N]. 由于N很大,用矩阵快速幂求解。 code: #include<bits/stdc++.h> using namespace std; typedef long long ll; const int MOD=1e9+7; ll n,m; struct mat { ll a[105][105]; }...原创 2019-02-19 14:47:39 · 200 阅读 · 0 评论 -
Codeforces #559 div2
D.求构造一个长度为n的字符串使得此字符串中最小”独特“子串的长度为k 数据满足n>=k 且n与k奇偶性相同 http://codeforces.com/contest/1159/problem/D #include<bits/stdc++.h> using namespace std; typedef long long ll; int n,k; string cal(...原创 2019-05-14 21:13:49 · 131 阅读 · 0 评论