原创 HDU2828--Lamp(Dancing Links)

Problem Description There are several switches and lamps in the room, however, the connections between them are very

原创 HDU4915--Parenthese sequence

Problem Description bobo found an ancient string. The string contains only three charaters -- "(", ")" and "?". bobo wo

原创 acdream--Matrix sum

Problem Description sweet和zero在玩矩陣遊戲,sweet畫了一個N * M的矩陣,矩陣的每個格子有一個整數。zero給出N個數Ki,和M個數Kj,zero要求sweet選出一些數,滿足從第 i 行至少選出

原创 POJ3241--Object Clustering(曼哈頓最小生成樹)

Description We have N (N ≤ 10000) objects, and wish to classify them into several groups by judgement of their resem

原创 HDU5001--Walk

Problem Description I used to think I could be anything, but now I know that I couldn't do anything. So I started tr

原创 HDU5044--Tree(樹鏈剖分)

Problem Description You are given a tree (an acyclic undirected connected graph) with N nodes. The tree nodes are num

原创 ural1960Palindromes and Super Abilities(迴文樹)

迴文樹根據以下博客學的,寫得很好 傳送門:http://blog.csdn.net/u013368721/article/details/42100363 After solving seven problems on Timus O

原创 3110: [Zjoi2013]K大數查詢

Description 有N個位置,M個操作。操作有兩種,每次操作如果是1 a b c的形式表示在第a個位置到第b個位置,每個位置加入一個數c 如果是2 a b c形式,表示詢問從第a個位置到第b個位置,第C大的數是多少。 Input

原创 2002: [Hnoi2010]Bounce 彈飛綿羊(分塊)

Description 某天,Lostmonkey發明了一種超級彈力裝置,爲了在他的綿羊朋友面前顯擺,他邀請小綿羊一起玩個遊戲。遊戲一開始,Lostmonkey在地上沿着一條直線擺上n個裝置,每個裝置設定初始彈力系數ki,當綿羊達到第i

原创 HDU5029--Relief grain(樹鏈剖分)

Problem Description The soil is cracking up because of the drought and the rabbit kingdom is facing a serious famine. T

原创 HDU2191(單調隊列優化DP)

Problem Description 急!災區的食物依然短缺! 爲了挽救災區同胞的生命,心繫災區同胞的你準備自己採購一些糧食支援災區,現在假設你一共有資金n元,而市場有m種大米,每種大米都是袋裝產品,其價格不等,並且只能整袋購買。

原创 POJ1160--Post Office(四邊形不等式優化)

Description There is a straight highway with villages alongside the highway. The highway is represented as an integer

原创 幾種常見取石子模型

由poj 1067引發的——取石子游戲【各類取石子總結】 上次做poj 1067的取石子游戲,只用到了whthoff博弈,未涉及到取石子的異或方法,今天重新搜索,整理了一遍。蒐羅各種資料,加上自己整理,終於成篇啦!……噼

原创 GDCPC2015

這兩天忙着趕實習的任務。所以總結就拖到現在了。 先簡單記錄下比賽吧。 這次隊名改成了Hold_the_crash。背後的故事這裏就不說了= =。 本場也是12題。依舊是WJ前4,我中4,SF後4。 開場就看E。水題一個。就上去搞。太久沒打

原创 2014ACM-ICPC牡丹江+鞍山總結

    10月8號:    晚上8點出發。坐火車!!好懷念讓我們坐飛機的老院長。。。     10.9~10.10     想想這是我第一次坐火車。從廣州到哈爾濱整整坐了40多鍾,晚點7小時也是醉了。。10號下午2點多才到哈爾濱,從哈爾