摘要: n^2f复杂度 生成单点 阅读全文
posted @ 2017-02-10 09:38 浪矢-CL 阅读(190) 评论(0) 推荐(0)
摘要: 弄了大半天,结果忘了调用数组。#include<iostream>#include<cstdio> for(int i=1;i<=n;i++) money[i]=100; for(int k=1;k<=n;k++) { for(int i=1;i<=n;i++) if(!son[i]) { cnt+ 阅读全文
posted @ 2017-02-09 15:24 浪矢-CL 阅读(149) 评论(0) 推荐(0)
摘要: 数据很弱,懒得优化。 阅读全文
posted @ 2017-02-09 09:37 浪矢-CL 阅读(279) 评论(0) 推荐(0)
摘要: 一个dp提耗费我怎么久。 把长度搞混了。 阅读全文
posted @ 2017-02-08 16:30 浪矢-CL 阅读(191) 评论(0) 推荐(0)
摘要: 多维的搜索,由爆搜,到dp演化一下。 搜索 阅读全文
posted @ 2017-02-08 15:24 浪矢-CL 阅读(257) 评论(0) 推荐(0)
摘要: 当成搜索题来做的, 直接搜肯定不行需要优化一下,权值打表就行了。 先搜索最少的,可以减少运算次数。 用二进制数表示某个数是否能用。 位运算还没写好 阅读全文
posted @ 2017-02-08 15:14 浪矢-CL 阅读(233) 评论(0) 推荐(0)
摘要: 用二进制数的每个位代表某行中每个位上是否能用。 阅读全文
posted @ 2017-02-08 15:07 浪矢-CL 阅读(604) 评论(0) 推荐(0)
摘要: #include #include #include #include #include using namespace std; #define M 100000 char al[M],bl[M]; int a[M],b[M],c[M]; int longa,longb; void yawei() { int i,j,k=1; for( i=longa-1,j=1;i>=0;... 阅读全文
posted @ 2017-02-05 09:35 浪矢-CL 阅读(259) 评论(0) 推荐(0)
摘要: #include #include #include #include using namespace std; int n,m,v[999999],w[999999],ans=0; void dfs(int x,int y,int z) { if(x==n+1) if(y>m) return ; else {ans=max... 阅读全文
posted @ 2017-02-04 09:17 浪矢-CL 阅读(257) 评论(0) 推荐(0)
摘要: #define INF 9999999 int n,a[99999],dp[9999][9999],ans=9999999,s[9999]; int main() { scanf("%d",&n); for(int i=1;i<=n;i++) scanf("%d",&a[i]),a[n+i]=a[i],s[i]=s[i-1]+a[i]; for(... 阅读全文
posted @ 2017-02-04 09:09 浪矢-CL 阅读(186) 评论(0) 推荐(0)