摘要: 题 思路 最开始用的dp做,但是发现只有10分 #include<iostream> using namespace std; string a,b; int main(){ cin>>a>>b; int dp[a.length()+1][b.length()+1]={0}; for(int i = 阅读全文
posted @ 2022-11-14 15:55 壹剑霜寒十四州 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 洛谷 8697 给你一个数组,求连续的数组最大值 方法dp 代码 #include<iostream> using namespace std; int main(){ int n ; cin>>n; int arr[n]; for(int i = 0;i<n;i++) cin>>arr[i]; i 阅读全文
posted @ 2022-11-14 15:06 壹剑霜寒十四州 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 洛谷1303 #include<iostream> using namespace std; const int N = 50000; int arr[2*N]; int aa[N]; int bb[N]; int main(){ string a,b; cin>>a>>b; for(int i = 阅读全文
posted @ 2022-11-14 12:25 壹剑霜寒十四州 阅读(9) 评论(0) 推荐(0) 编辑
摘要: A+B ` 考虑高精度 代码 #include<iostream> using namespace std; const int N = 510; int arr[N],aa[N],ab[N]; int main(){ string a,b; cin>>a; cin>>b; int sizea = 阅读全文
posted @ 2022-11-14 11:28 壹剑霜寒十四州 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 洛谷1255,数楼梯 概念 特高精度 long long也无法满足,就要用string或者数组存放数字 方法 斐波那契+高精度 代码 #include<iostream> #include<cmath> #include<algorithm> using namespace std; int f[5 阅读全文
posted @ 2022-11-14 09:44 壹剑霜寒十四州 阅读(7) 评论(0) 推荐(0) 编辑