摘要: #include<bits/stdc++.h>using namespace std;int a[5007];int dp[5007][5007];int main(){ int n; scanf("%d",&n); for(int i=1;i<=n;i++) scanf("%d",&a[i]); 阅读全文
posted @ 2019-02-21 15:28 sewage 阅读(178) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int dp[1000007][7][7];int cnt[1000007];int main(){ int n,m; scanf("%d%d",&n,&m); int x=0; for(int i=1;i<=n; 阅读全文
posted @ 2019-02-21 14:30 sewage 阅读(122) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;char s[100007];long long a[100007];long long dp[100007][4];int main(){ int n; scanf("%d",&n); scanf("%s",s) 阅读全文
posted @ 2019-02-21 13:21 sewage 阅读(158) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;long long dp[507][507];const long long mod = 998244353;int main(){ int n,k; scanf("%d%d",&n,&k); for(int i= 阅读全文
posted @ 2019-02-20 21:11 sewage 阅读(151) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;long long n,v,a,b,c,d,e;int main(){ scanf("%d",&n); while(n--){ scanf("%d",&v); a+=v;//记录前面全清零需要的花费 b=min(b 阅读全文
posted @ 2019-02-20 19:40 sewage 阅读(123) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int cnt[10]={0,2,5,5,4,5,6,3,7,6};int dp[10007];int vis[17];int main(){ int n,m; scanf("%d%d",&n,&m); memse 阅读全文
posted @ 2019-02-18 20:05 sewage 阅读(259) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<cstdio>#include<algorithm>#include<cmath>#include<cstring>using namespace std;int x[10],y[10];int dangerous[17][17];char z[ 阅读全文
posted @ 2019-01-22 01:11 sewage 阅读(168) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;char s[100007];long long a[100007];long long dp[100007][4];int main(){ int n; scanf("%d",&n); scanf("%s",s) 阅读全文
posted @ 2019-01-17 19:12 sewage 阅读(117) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;long long a[150007];long long ans[150007];int main(){ int n; scanf("%d",&n); for(int i=1;i<=n;i++){ scanf(" 阅读全文
posted @ 2019-01-16 15:14 sewage 阅读(156) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;const long long mod = 1e9+7;char s[370007][27];long long a[370007];set<long long>st;int main(){ int n; scan 阅读全文
posted @ 2019-01-16 15:08 sewage 阅读(134) 评论(0) 推荐(0) 编辑