会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
浪矢\n
博客园
新随笔
管理
上一页
1
···
41
42
43
44
45
2017年2月8日
八皇后的 位运算优化
摘要: 用二进制数的每个位代表某行中每个位上是否能用。
阅读全文
posted @ 2017-02-08 15:07 浪矢-CL
阅读(581)
评论(0)
推荐(0)
2017年2月5日
高精加
摘要: #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
阅读(236)
评论(0)
推荐(0)
2017年2月4日
背包搜索,简化
摘要: #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
阅读(247)
评论(0)
推荐(0)
合并石子,区间dp
摘要: #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
阅读(161)
评论(0)
推荐(0)
最长上升连续子序列
摘要: 1 #define INF 100099 2 int n,m,a[99999],s[99999],ans; 3 void dfs(int x,int y) 4 { 5 if(x==n+1) return; 6 else{ 7 if(a[x-1]<a[x]) s[x]=s[x-1]+1,dfs(x+1,s[x]); 8 ...
阅读全文
posted @ 2017-02-04 09:04 浪矢-CL
阅读(236)
评论(0)
推荐(0)
上一页
1
···
41
42
43
44
45
公告