上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页
摘要: //==========================蒟蒻Macaulish:http://www.cnblogs.com/Macaulish/转载要声明!//==========================好久没写题解了。但是这题太神了然后做法太神了于是写一下。这题做法很多,比如黄学长hzw... 阅读全文
posted @ 2015-04-01 22:01 Macaulish 阅读(698) 评论(0) 推荐(0) 编辑
摘要: var n,m,i,j,ans:longint; x,y,time,f:array[0..10010]of longint; begin readln(n,m); for i:=1 to m do readln(time[i],x[i],y[i]); ans:=1; for i:=1 to m do 阅读全文
posted @ 2015-03-22 22:11 Macaulish 阅读(358) 评论(0) 推荐(0) 编辑
摘要: dp,但是要顺推容易点 const mm=12345678; var f:array[0..1,0..200,0..20,0..20]of longint; n,m,kk,now,sum,i,j,k1,k2:longint; function max(x,y:longint):longint; be 阅读全文
posted @ 2015-03-22 22:10 Macaulish 阅读(169) 评论(0) 推荐(0) 编辑
摘要: //==========================蒟蒻Macaulish:http://www.cnblogs.com/Macaulish/转载要声明!//==========================判断二分图中某条路是否是唯一的。网络流做法要加个tarjan二分图就是再增广看能不能增... 阅读全文
posted @ 2015-03-22 22:09 Macaulish 阅读(562) 评论(0) 推荐(0) 编辑
摘要: 直接费用流,天数就是点数 type arr=record toward,next,cap,cost:longint; end;const maxm=200000; maxn=200; mm=1=0 do begin too:=edge[i].toward; value:=... 阅读全文
posted @ 2015-03-22 22:07 Macaulish 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 推推公式,最后变成四个东西的前缀和然后不知道为什么一直wa,数据在本地测是没有错的&好心的管理员还给了某位p党大神a了的代码,感人肺腑(虽然还是没发现到底我的程序是问题)var f1,f2,f3,f4:array[0..2500,0..2500]of longint; x1,y1,x2,y2,n... 阅读全文
posted @ 2015-03-22 22:06 Macaulish 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 太神了直接看了hzwer的题解,有个新认识,一条路径上满流的一定是这条路径上所有边的最小值。type arr=record toward,next,cap,from:longint; end;const maxm=200000; maxn=10000;var edge:array[0... 阅读全文
posted @ 2015-03-22 22:03 Macaulish 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 明显拆点费用流; type arr=record toward,next,cap,cost:longint; end; const mm=1=0 do begin too:=edge[i].toward; value:=edge[i].cost; if (edge[i]... 阅读全文
posted @ 2015-03-22 22:02 Macaulish 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 傻叉了一晚上,把t打成x,然后这题神奇在于输出一段数,不足的不用输出,一开始我的是直接找没有后面就退,然后这样会格式错误囧……然后最后zj的还卡了下空间,于是不用string就过了……string毁一生……const maxn=250550; mm=2000000;var hash,size,... 阅读全文
posted @ 2015-03-22 22:01 Macaulish 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 简单的递推。const mm=10000; var i,j,n,m:longint; f:array[0..1005,0..1005]of longint; begin readln(n,m); f[1,0]:=1; for i:=2 to n do begin f[i,0]:=1... 阅读全文
posted @ 2015-03-22 22:00 Macaulish 阅读(104) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页