摘要: 同田忌赛马 1 #include <iostream> 2 #include <algorithm> 3 #include <cstdio> 4 #include <cstring> 5 #include <cstdlib> 6 using namespace std; 7 8 const int 阅读全文
posted @ 2017-01-31 23:44 KingSann 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 压缩一下块,然后区间dp。 左右两边合并的时候的代价是是否加起来大于2。(是否需要再插入一个球) 1 uses math; 2 var _color:array[0..1000] of Longint; 3 _tot:array[0..1000] of Longint; 4 src:array[0. 阅读全文
posted @ 2017-01-31 21:49 KingSann 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 扫一遍凸包,然后卡一圈壳。 (pascal好玄) 1 type Point=record 2 x,y:Real; 3 end; 4 var i,j,n,top,his,p1,p2:longint; 5 p,stack:array[0..10010] of Point; 6 ans:Real; 7 8 阅读全文
posted @ 2017-01-31 20:53 KingSann 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 1 var i,j,k,n,m,len,head,tail,p,tot,ans1,ans2,x:Longint; 2 ch:array[0..20000] of array[0..30] of Longint; 3 fail:array[0..20000] of Longint; 4 fg:arra 阅读全文
posted @ 2017-01-31 18:20 KingSann 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 很明显,跑一边最小生成树然后记录一下最小瓶颈就是答案了。 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 using namespac 阅读全文
posted @ 2017-01-31 09:59 KingSann 阅读(115) 评论(0) 推荐(0) 编辑