• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






This_poet——Only a poet

为省队而奋斗,为NOI而奋斗!This_poet@126.com
 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2011年10月8日

POJ 1182食物链——并查集模板题
摘要: 没什么好说的了,用CL2姐姐的话说,题解满天飞,标程也满天飞……我的代码:Program eat;//by_ThispoetConst maxn=50005;Var father,data :Array[1..maxn]of Longint; ans,i,k,n,m,p,q :Longint; Function Root(i:Longint):Longint;var t:Longint;begin if father[i]=i then exit(i); t:=father[i]; father[i]:=Root(father[i]); data[i]:=(data[i]+data[... 阅读全文
posted @ 2011-10-08 18:02 This_poet 阅读(369) 评论(0) 推荐(0)
 
POJ1915 —— 双向广搜代码模板
摘要: Program poj1915;//By_ThispoetConst maxn=100000; ddx:Array[1..8]of Integer=(1,1,2,2,-1,-1,-2,-2); ddy:Array[1..8]of Integer=(2,-2,1,-1,2,-2,1,-1);Var i,j,k,m,n,p,q :Longint; h,t :Array[1..2]of Longint; step :Array[1..2,0..300,0..300]of Longint; v :Array[1..2,0..300,0..300]of Boole... 阅读全文
posted @ 2011-10-08 17:00 This_poet 阅读(871) 评论(0) 推荐(0)
 
POJ3414 —— Bfs基础模板代码
摘要: Program poj3414;//By_ThispoetConst maxn=100;Var v :Array[0..maxn,0..maxn]of Boolean; h,t,p,q :Longint; a,b,c,i,j :Longint; seq :Array[1..maxn*maxn*10]of record l,r,fa,did:Longint;end; ans :Array[0..maxn*maxn]of Longint; flag :Boolean; Function Check(i:Longint):Boolean;begin if (seq[i].l=c)o... 阅读全文
posted @ 2011-10-08 14:39 This_poet 阅读(570) 评论(0) 推荐(0)
 
POJ2488 ——Dfs基础算法模板
摘要: Program poj2488;//By_ThispoetConst ddx:Array[1..8]of Integer=(-2,-2,-1,-1,1,1,2,2); ddy:Array[1..8]of Integer=(-1,1,-2,2,-2,2,-1,1); maxn=26;Type rec=record ch:Char; num:Longint; end;Var i,j,m,n,o,p,q :Longint; v :Array[1..maxn,1..maxn]of Boolean; stack :Array[1..maxn*maxn]of rec; flag... 阅读全文
posted @ 2011-10-08 10:28 This_poet 阅读(727) 评论(0) 推荐(0)
 
推荐的Poj题目
摘要: NOIP2011结束了,搞了个不好不坏的成绩:460,河北省第8,高二第五,所幸没丢掉省选资格,而且经目测是河北唯一一个得到省一的高二女生……省选压力似乎小些吧……额、可是省选不是我的目标啊= =那样进省队后还不是各种不会各种被虐被鄙视~>_<~ 我的目标是湖南的沈添笑神牛。虽然沈添笑神牛在NOI2011上发挥的不理想,可HNOI2011见证了实力啊~现在还差很远,不到一年的时间,努力追吧! 额、我也老了……也讲了第一堂课……于是,我就有了把我的NOIP前Poj上的AC Record放上来的想法…… 嗯,新学的OIer和ACMer可以看看,老牌的OIer以及ACMer就不要鄙视了~ 阅读全文
posted @ 2011-10-08 09:23 This_poet 阅读(718) 评论(0) 推荐(1)
 
POJ1386 & POJ1041 ——再探欧拉路、欧拉回路
摘要: 今天状态不好,做欧拉路题目练手都很不顺利。再贴一遍求欧拉回路的模板加深印象:void Eular(int i);{ for (p,p<=code[i][0],p++) { if (! v[edge[i][p]]) { v[edge[i][p]]=true; Eular(code[i][p]); stack[stack_size++]=edge[i][p]; } }}具体的一些问题探讨:1、无向图存在欧拉回路条件:每个点入度都为偶数2、无向图存在欧拉路条件:只有两个点入度为奇数或每个点入度都为偶数3、有向图存在欧拉回路条件:每个点入度都等于出度4、有向... 阅读全文
posted @ 2011-10-08 00:32 This_poet 阅读(761) 评论(0) 推荐(0)