原创 hdu 4773 圓的反演變換

Problem of Apollonius                                                                           Time Limit: 2000/1000

原创 hdu 5723 Abandoned country

Abandoned country Time Limit: 8000/4000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission

原创 計蒜客 騰訊手機地圖

騰訊手機地圖的定位功能用到了用戶手機的多種信號,這其中有的信號的作用範圍近,有的信號作用的範圍則遠一些。有的信號相對於用戶在不同的方位強度是不同的,有的則是在任何一個方向上信號強度都一致的。 已知用戶面向北方拿着自己的手機,在不同方位

原创 poj 2002 Square

Squares Time Limit: 3500MS   Memory Limit: 65536K Total Submissions: 18509   Accepted: 7131 Description A square i

原创 hdu 3833 YY's new problem

YY's new problem Time Limit: 12000/4000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission

原创 hdu 5724(博弈論+狀態壓縮)

Chess Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1044   

原创 Codeforces Round #363 D Fix a Tree(並查集)

D. Fix a Tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output s

原创 AC自動機模板

AC自動機主要是用於多模式串的匹配問題,按照我的理解,AC自動機就是在Tire樹上實現KMP算法,由於AC自動機加入了失敗指針,所以可以把他看成一個狀態轉移的圖。 給出模板 #include<iostream> #include<cstd

原创 hdu 1247 Hat’s Words

Problem Description A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in

原创 treap的應用

Description 有一個序列含有一定數量的元素,現在要求寫一個程序,滿足以下幾個要求: 【A】支持插入操作(這個序列不允許有重複元素,即是說,如果待插入的元素已經出現在這個序列中,那麼請忽略此操作) 【B】支持刪除操作(如

原创 hdu 2587 Mirror and Light

Problem Description The light travels in a straight line and always goes in the minimal path between two points, are

原创 poj 1840 Eqs

Eqs Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 15037   Accepted: 7372 Description Consider equa

原创 hdu 3397 Sequence operation(線段樹區間覆蓋,區間合併)

Problem Description lxhgww got a sequence contains n characters which are all '0's or '1's. We have five operations h

原创 hdu 1712 ACboy needs your help

Problem Description ACboy has N courses this term, and he plans to spend at most M days on study.Of course,the profit

原创 hdu 5667 sequence

Problem Description     Holion August will eat every thing he has found.    Now there are many foods,but he does no