- 博客(7)
- 资源 (3)
- 收藏
- 关注
原创 HDU 1856 -More is better
并查集rank数组 Description Mr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there are certain requir
2016-04-30 11:29:45 301
原创 HDU 1233
畅通工程 贪心最小生成树 #include #include #include using namespace std; int a[10001]; struct st { int x,y,len; }s[100001]; int find(int x) { while(a[x]!=x) { x=a[x]; } return x; } int un(int x,int
2016-04-30 11:23:11 350
原创 Aizu 0558
Description 問題 今年も JOI 町のチーズ工場がチーズの生産を始め,ねずみが巣から顔を出した.JOI 町は東西南北に区画整理されていて,各区画は巣,チーズ工場,障害物,空き地のいずれかである.ねずみは巣から出発して全てのチーズ工場を訪れチーズを 1 個ずつ食べる. この町には,N 個のチーズ工場があり,どの工場も1種類のチーズだけを生産している.チーズの硬さは工場によって異
2016-04-30 11:15:59 518
原创 HDU 1754 I Hate It
线段树入门 #include #include #include #define lson rt<<1 #define rson (rt<<1)+1 using namespace std; int a[1000001]; char b[1000001]; void build(int l,int r,int rt) { if(l==r) { scanf("%d"
2016-04-30 11:09:51 269
原创 POJ 3461 Oulipo
Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book: Tout avait Pair n
2016-04-30 11:07:36 350
原创 POJ 2406
Description Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponen
2016-04-30 11:03:26 281
转载 KMP算法C代码实现
一、初识KMP 理解KMP算法需要关注2个问题:(请注意:字符串下标从0开始。) 当i指针与j指针失配时: 1、当母串和模式串不匹配时,i指针为什么不需要回溯? 2、当母串和模式串不匹配时,i指针不回溯,那么j指针应该移动到哪? 通过解释第1个问题,我来引出第2个问题。(其实第1个问题,你不明白,不影响你研究第2个问题,你也可以
2016-04-14 10:51:52 669
MyEclipse 2015 Stable 2.0破解
2015-10-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人