题解列表

筛选

STL stack模板类

摘要:解题思路:使用STL模板类stack处理元素入栈出栈注意事项:参考代码:#include<iostream> #include<string> #include<stack> #include<……

信息学奥赛一本通T1278- 复制书稿

摘要:解题思路:分治, r为分治求出的最短时间,从后向前遍历书稿,将书稿复制边界存入res数组中注意事项:参考代码:#include#includeusing namespace std; const i……

鬼知道我写了多少遍

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N=1e3;ll a……

1099: 校门外的树

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>typedef long long ll;const int N=1e7;using namespace std;int ……

信息学奥赛一本通T1276 -编辑距离

摘要:解题思路:f[i][j]表示i长度的字符串变化到j长度字符串的最短距离注意事项:参考代码:#include<iostream> using namespace std; const int N =……

1314: 乘积最大

摘要:解题思路:f[i][j]表示到索引i数字字符插入j个乘号,所能得到最大的乘积。 初始化f[i][0] 为到i索引字符结束的整数(插入了0个乘号);r遍历字符从1到i个字符每种情况, 状态转移方程:f[……