题解列表
A+B for Input-Output Practice (IV)
摘要: #include
using namespace std;
int main()
{
int i=0,n;
int ……
区间dp+前缀和 #1898: 蓝桥杯算法提高VIP-合并石子(C++)
摘要:n堆石子,挑选任意一端区间 [L,R]
我们用F[L,R]表示从L到R合并为一堆所需要的**最小代价**
枚举一个切分点,把区间分割为[L,K] - [K+1,R],
那么问题就转为……
字符串形式求解阶乘和数-C(一点小见解......)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int fact(int num);int main(){ int num=0,j=0,sum……
A+B for Input-Output Practice (V)
摘要: #include
using namespace std;
int main()
{
int i=0,j=0;
int N,n;……
表达式括号匹配(stack),来看看吧,不用栈写法
摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h"
using namespace std;
// 定义一个字符串变量ch,用于存储输入的字符串
string ch;
……
状态机模型DP #3067: 大盗阿福(C++)
摘要:# 大盗阿福
N家店铺
同时偷两家报警系统会启动
不惊动警察的情况下,最多可以得到多少现金
**状态 :** 对于当前店铺 [偷 | 不偷]
**状态定义 :** f[i……
编写题解 3029: 逆波兰表达式
摘要:inver = input().split()
inver = inver[::-1]
def arithmetic(inver):
if inver:
alphabe……