会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
禅境花园
新博客 http://xiang578.github.io/
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
10
11
12
13
14
15
16
17
18
···
37
下一页
2015年7月27日
二叉索引树——树状数组
摘要: int lowbit(int x){ return x&(-x);}int sum(int x){ int ret=0; while(x>0) { ret+=c[x]; x-=lowbit(x); } return re...
阅读全文
posted @ 2015-07-27 09:25 xryz
阅读(97)
评论(0)
推荐(0)
2015年7月25日
poj 3548 Restoring the digits(DFS)
摘要: #include#include#includeusing namespace std;int use[30],a[30],flag,b[30],m,p[20];char s[1024];void dfs(int x){ int i,a1,a2,a3,t,l; if(fl...
阅读全文
posted @ 2015-07-25 16:21 xryz
阅读(150)
评论(0)
推荐(0)
poj 2062 Card Game Cheater(排序+模拟)
摘要: #include#include#includeusing namespace std;struct data{ int x,y;} a[200],b[200];bool cmp(data n,data m){ if(n.x==m.x) return n.yb[j].x)...
阅读全文
posted @ 2015-07-25 15:16 xryz
阅读(159)
评论(0)
推荐(0)
poj 2570 Fiber Network(floyd)
摘要: #include#include#includeusing namespace std;int mp[30][250][250];int main(){ int n,u,v,i,j,l,k,p,f; char s[1024]; while(~scanf("%d",&...
阅读全文
posted @ 2015-07-25 14:25 xryz
阅读(136)
评论(0)
推荐(0)
2015年7月24日
hdu 1080 Human Gene Functions
摘要: #includeusing namespace std;int a[128][128];void init(){ memset(a,0,sizeof(a)); a['A']['A']=5; a['A']['C']=-1; a['A']['G']=-2; ...
阅读全文
posted @ 2015-07-24 16:33 xryz
阅读(121)
评论(0)
推荐(0)
hdu 4512 吉哥系列故事——完美队形I(最长公共上升自序加强版)
摘要: 首先要去学习最长公共上升子序列LCIS,然后是对n*n效率的算法进行优化,这里要注意的是可以求出来的序列中间可以有一个最高的。刚开始将输入的数组进行逆置,写下来发现这可能存在问题。不过具体是什么也没有仔细想明白。#includeusing namespace std;int dp[3...
阅读全文
posted @ 2015-07-24 15:29 xryz
阅读(152)
评论(0)
推荐(0)
2015 Multi-University Training Contest 2
摘要: 1006Friends 刚开始想用邻接矩阵来保存边的关系,不过后来发现实现dfs时很困难。后来又想到了储存边的关系来dfs,这会终于ac了。这几天写了好几道最小生成树的水题,居然一下子想不到用领接表来存储,实在是不应该#include#include#includeusing na...
阅读全文
posted @ 2015-07-24 13:55 xryz
阅读(93)
评论(0)
推荐(0)
poj 1258 Agri-Net(最小生成树)
摘要: #includeusing namespace std;const int inf=1<<24;int main(){ int n,i,j,k,e[50][50],u,v,w,low[50],ans; char s; while(~scanf("%d",&n)) ...
阅读全文
posted @ 2015-07-24 12:55 xryz
阅读(101)
评论(0)
推荐(0)
2015年7月23日
2015 Multi-University Training Contest 1记录
摘要: 1001 OO’s Sequence分析:对于样例,可以得到,我们要求的是(1,1)(1,2)(1,3)(1,4)(1,5)(2,2)(2,3)(2,4)(2,5)(3,3)(3,4)(3,5)(4,4)(4,5)(5,5)这些范围内满足题目中所给的要求的i的个数。所以可以将两个求和...
阅读全文
posted @ 2015-07-23 13:43 xryz
阅读(132)
评论(0)
推荐(0)
hdu 1243 反恐训练营
摘要: #include#include#includeusing namespace std;int dp[2048][2048];int main(){ int i,j,n,s[500],t; char s1[2048],s2[2048],s3[2048]; while...
阅读全文
posted @ 2015-07-23 09:36 xryz
阅读(104)
评论(0)
推荐(0)
上一页
1
···
10
11
12
13
14
15
16
17
18
···
37
下一页
公告