随笔分类 - 题
摘要:唐 #include<bits/stdc++.h> #define U(i,l,r) for(int i(l);i<=r;++i) #define D(i,r,l) for(int i(r);i>=l;--i) #define Huge_Int vector<long long> #define B
阅读全文
摘要:水题,一起切了 #include<bits/stdc++.h> using namespace std; int a[5000010]; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,k; cin>>n>>k;
阅读全文
摘要:st表。(还是半懂不懂) #include <bits/stdc++.h> using namespace std; int n,m,x,y,l,a[100010],f[100010][20]; int main(){ cin>>n>>m; a[1]=0; for(int i=2;i<=n;i++)
阅读全文
摘要:把exgcd忘光了QAQ #include<bits/stdc++.h> using namespace std; long long ans,x1,y1; long long exgcd(long long a,long long b,long long &x1, long long &y1){
阅读全文
摘要:区间dp。 转移方程见题解(doge) #include<bits/stdc++.h> using namespace std; int m[310],dp[310][310],ans; int main() { ios::sync_with_stdio(0); cin.tie(NULL); cou
阅读全文
摘要:模板区间dp. 懒癌,于是把石子合并copy了一下。 #include<bits/stdc++.h> using namespace std; int m[310],dp[310][310],anss,ans; int main() { ios::sync_with_stdio(0); cin.ti
阅读全文
摘要:简单四维dp。 #include<bits/stdc++.h> using namespace std; int a[355],b,t[5],dp[45][45][45][45]; int main(){ ios::sync_with_stdio(0); cin.tie(NULL); cout.ti
阅读全文

浙公网安备 33010602011771号