原创 E - Cycling HDU - 2363

You want to cycle to a programming contest. The shortest route to the contest might be over the tops of some mountains

原创 hdu6053TrickGCD(莫比烏斯反演)

參考:http://blog.csdn.net/u013632138/article/details/52250567           http://blog.csdn.net/xlzhang223/article/details/

原创 F - Pagodas HDU - 5512

nn pagodas were standing erect in Hong Jue Si between the Niushou Mountain and the Yuntai Mountain, labelled from 11 

原创 1401 有趣的旅行

有N個城市,每個城市編號時從0到(N - 1),它們靠(N - 1)條雙向道路相連。任意兩個不同地城市之間都有一條唯一的路徑相連。每個城市還有一個吸引力值,吸引力值越大的城市代表它越有趣,就越能吸引人。你要決定一次旅行,滿足如下條件

原创 H(1946): A Rational Sequence

Description An infinite full binary tree labeled by positive rational numbers is defined by: The label of the root is

原创 E - RealPhobia HDU - 4180

Bert is a programmer with a real fear of floating point arithmetic. Bert has quite successfully used rational numbers

原创 F - Level up HDU - 3954

Level up is the task of all online games. It's very boooooooooring. There is only level up in those games, except leve

原创 K - Co-prime HDU - 4135

Given a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime t

原创 M - How many integers can you find HDU - 1796

Now you get a number N, and a M-integers set, you should find out how many integers which are small than N, that they

原创 G - Domino Effect POJ - 1135

Did you know that you can use domino bones for other things besides playing Dominoes? Take a number of dominoes and bui

原创 水羣

總所周知,水羣是一件很浪費時間的事,但是其實在水羣這件事中,也可以找到一些有意思的東西。 比如現在,bx2k就在研究怎樣水錶情的問題。 首先,bx2k在對話框中輸入了一個表情,接下來,他可以進行三種操作。 第一種,是全選複製,把所有

原创 J - 2016 CSU - 1803

給出正整數 n 和 m,統計滿足以下條件的正整數對 (a,b) 的數量: 1. 1≤a≤n,1≤b≤m; 2. a×b 是 2016 的倍數。 Input 輸入包含不超過 30 組數據。 每組數據

原创 1444 破壞道路

1444 破壞道路 題目來源: CodeForces 基準時間限制:1.5 秒 空間限制:131072 KB 分值: 80 難度:5級算法題  收藏  關注 在某一個國家,那兒有n個城市,他們通過m條雙向道

原创 Knapsack in a Globalized World

Problem description Globalization stops at nothing, not even at the good old honest profession of a burglar. Nowadays

原创 D - Theseus and labyrinth CodeForces - 676D

Theseus has just arrived to Crete to fight Minotaur. He found a labyrinth that has a form of a rectangular field of siz