https://vjudge.net/contest/353157#problem/A 一开始用的记忆化搜索= = 样例能过不知道为啥提交WA = 。= = 。= 1 #include <iostream> 2 #include <cstring> 3 #include <algorithm> 4 ...
分类:
其他好文 时间:
2020-01-28 12:39:19
阅读次数:
60
A题 签到题 B题 只需要贪心的调换成只能经过一次调换的最小字符串,再与目标串比较 #include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> using namespace st ...
分类:
其他好文 时间:
2020-01-28 12:30:35
阅读次数:
54
1 #include <string> 2 #include <iostream> 3 #include <cstring> 4 #include <algorithm> 5 6 using namespace std; 7 8 int to_lower(int c) 9 { 10 if (isup ...
分类:
其他好文 时间:
2020-01-28 12:25:29
阅读次数:
65
十分有趣的多项式推式子题,多多积累. code: #include <cmath> #include <cstring> #include <algorithm> #include <cstdio> #include <string> #define ll long long #define ull ...
分类:
其他好文 时间:
2020-01-27 23:57:12
阅读次数:
129
//判断负环 在负环内的城市输出? #include <iostream> #include <queue> #include <cstdio> #include <algorithm> #include <string.h> #include <string> using namespace st ...
分类:
其他好文 时间:
2020-01-27 19:09:16
阅读次数:
82
#include<iostream> #include<algorithm> #include<queue> #include<cstdio> #include<cstring> using namespace std; const int N=1100,INF=0x3f3f3f3f; int h[ ...
分类:
其他好文 时间:
2020-01-27 17:35:24
阅读次数:
81
一道简单的贪心模板题 http://poj.org/problem?id=2393 将每天的价格都放到最低就行了 核心思路:第i天最低的价格 = min(第i-1天最低的价格+s,第i天原本的价格) 有了思路,代码随便打 #include <iostream> #include <algorithm ...
分类:
其他好文 时间:
2020-01-27 17:05:16
阅读次数:
70
#include<iostream> #include<algorithm> using namespace std; int v[6002],w[6002],s[6002],f[6002],n,m; int main(){ cin>>n>>m; for(int i=1;i<=n;i++) cin> ...
分类:
其他好文 时间:
2020-01-27 15:43:15
阅读次数:
59
好神仙的概率题啊 我感觉第一步转化好难想,但是想出来第一步的转化方法的话后面用生成函数算背包就很简单了. code: #include <cmath> #include <cstring> #include <algorithm> #include <cstdio> #include <string ...
分类:
其他好文 时间:
2020-01-27 15:20:53
阅读次数:
50
https://vjudge.net/contest/353156#problem/A 一开始想着按背包做 = = 我的dp还是太菜了 应该按照单调序列做 1 #include <iostream> 2 #include <algorithm> 3 #include <vector> 4 using ...
分类:
其他好文 时间:
2020-01-27 13:48:24
阅读次数:
59