原创 Convert QWERTY to Dvorak

Edward, a poor copy typist, is a user of the Dvorak Layout. But now he has only a QWERTY Keyboard with a broken Caps Lo

原创 Just a Hook

In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made

原创 Hangover

題目:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=10018 題意: 輸入一個 M     當1/2 + 1/3 + 1/4 + ... + 1/(n + 1)>

原创 Bit String Reordering

題目來源:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=139521 輸入: 6 3 1 0 0 1 0 1 1 3 2 輸出: 1 題意: 輸入:n m (

原创 括號匹配

題目描述 有一串括號(只包含"(", ")", "[", "]", "{", "}"), 保證這一括號串是匹配的, 長度小於100000, 有m個詢問, 每個詢問爲一個整數x;對於每一個詢問, 要求輸出一行四個整數y, a, b, c

原创 Machine Schedule

As we all know, machine scheduling is a very classical problem in computer science and has been studied for a very lo

原创 Flipping Parentheses

題目來源:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=138130 輸入: 6 3 ((())) 4 3 1 輸出: 2 2 1 題意:輸入n,q (2

原创 人生成就

題目描述 人生就像一個n*n的矩陣,矩陣每個元素都跟上下左右四個方向的元素聯通,起始在左上角,終止在右下角,從起點開始,每次一個向右或向下移動一格。 每個元素上面都有一個人生成就值,表示你如果經歷這個元素時候能增加的人生成就。 初始時

原创 JuQueen

題目來源:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=134851  輸入: 10 10 5 state 0 groupchange 2 9 7 state 9

原创 Air Raid

Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also

原创 Count the Colors(兩種)

Description Painting some colored segments on a line, some previously painted segments may be covered by some the s

原创 May Day Holiday

As a university advocating self-learning and work-rest balance, Marjar University has so many days of rest, including h

原创 防守陣地 II

Description 部隊中總共有N個士兵,每個士兵有各自的能力指數Xi,在一次演練中,指揮部確定了M個需要防守的地點,指揮部將選擇M個士兵依次進入指定地點進行防守任務,獲得的參考指數即爲M個士兵的能力之和。隨着時間的推移,指揮

原创 等式數量

Description 集合是基本的數學概念,它是集合論的研究對象。關於集合論最簡單的說法,是在最原始的集合論《樸素集合論》中的定義:集合就是“一堆東西”。集合裏的“東西”,叫作元素。若x是集合A中的元素,記作 x∈A。集合

原创 Friend

Description On an alien planet, every extraterrestrial is born with a number. If the sum of two numbers is a prime