
并查集
w__gavin
这个作者很懒,什么都没留下…
展开
-
hdu 1598 find the most comfortable road
XX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure—超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了固定的Speed,同时XX星人对 Flycar的“舒适度”有特殊要求,即乘坐过程中最高速度与最低速度的差越小乘坐越舒服 ,(理解为SARS的限速要求,flycar必须瞬间提速/降速,痛苦呀 ), 但XX星人对时间却没原创 2017-10-19 18:38:01 · 237 阅读 · 0 评论 -
hdu 3461 Code Lock
A lock you use has a code system to be opened instead of a key. The lock contains a sequence of wheels. Each wheel has the 26 letters of the English alphabet ‘a’ through ‘z’, in order. If you move a wh原创 2017-11-03 17:10:35 · 253 阅读 · 0 评论 -
hdu 3635 Dragon Balls
Five hundred years later, the number of dragon balls will increase unexpectedly, so it’s too difficult for Monkey King(WuKong) to gather all of the dragon balls together. His country has N cities and t原创 2017-11-09 20:09:19 · 227 阅读 · 0 评论 -
poj 2236 Wireless Network
Wireless Network Time Limit: 10000MS Memory Limit: 65536K Total Submissions: 30934 Accepted: 12865 DescriptionAn earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical原创 2017-10-15 10:06:25 · 160 阅读 · 0 评论 -
poj 2524 Ubiquitous Religions
Ubiquitous Religions Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 37479 Accepted: 17864 DescriptionThere are so many different religions in the world today that it is diffi原创 2017-10-14 22:38:26 · 170 阅读 · 0 评论 -
poj 1611 The Suspects
The Suspects Time Limit: 1000MS Memory Limit: 20000K Total Submissions: 42609 Accepted: 20555 DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiol原创 2017-10-14 16:11:39 · 155 阅读 · 0 评论 -
hdu 3938 Portal ( 离线并查集)
ZLGG found a magic theory that the bigger banana the bigger banana peel .This important theory can help him make a portal in our universal. Unfortunately, making a pair of portals will cost min{T} ener原创 2017-10-21 21:11:37 · 235 阅读 · 0 评论 -
hdu 1811 Rank of Tetris(拓扑排序+并查集)
自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜还响。关于如何排名,这个不用说都知道是根据Rating从高到低来排,如果两个人具有相同的Rating,那就按这几个人的RP从高到低来排。 终于,Lele要开始行动了,对N个人原创 2017-10-21 13:03:03 · 245 阅读 · 0 评论 -
hdu 3172 Virtual Friends
These days, you can do all sorts of things online. For example, you can use various websites to make virtual friends. For some people, growing their social network (their friends, their friends’ friend原创 2017-11-06 20:50:25 · 183 阅读 · 0 评论 -
hdu 2473 Junk-Mail Filter
Recognizing junk mails is a tough task. The method used here consists of two steps: 1) Extract the common characteristics from the incoming email. 2) Use a filter matching the set of common charact原创 2017-11-06 19:19:18 · 321 阅读 · 0 评论 -
hdu 3038 How Many Answers Are Wrong
TT and FF are … friends. Uh… very very good friends -__-b FF is a bad boy, he is always wooing TT to play the following game with him. This is a very humdrum game. To begin with, TT should write down a原创 2017-11-14 19:59:11 · 374 阅读 · 0 评论