原创 HDU5950(67/600)

Farmer John likes to play mathematics games with his N cows. Recently, they are attracted by recursive sequences. I

原创 BZOJ2301(75/600)

對於給出的 n 個詢問,每次求有多少個數對 (x,y) ,滿足 a ≤ x ≤ b , c ≤ y ≤ d ,且 gcd(x,y) = k , gcd(x,y) 函數爲 x 和 y 的最大公約數。 Input 第一行一個整數n,

原创 HDU - 5699(79/600)

公元2222年,l國發生了一場戰爭。 小Y負責領導工人運輸物資。 其中有mm種物資的運輸方案,每種運輸方案形如li,rili,ri。表示存在一種貨物從lili運到riri。 這裏有nn個城市,第ii個城市與第i+1i+1個城

原创 POJ - 2184(78/600)

“Fat and docile, big and dumb, they look so stupid, they aren’t much fun…” - Cows with Guns by Dana Lyons The

原创 HDU - 5521(69/600)

Bessie and her friend Elsie decide to have a meeting. However, after Farmer John decorated his fences they were s

原创 CodeForces - 834D(80/600)

Some time ago Slastyona the Sweetmaid decided to open her own bakery! She bought required ingredients and a wonder-

原创 BZOJ2005(74/600)

棟棟有一塊長方形的地,他在地上種了一種能量植物,這種植物可以採集太陽光的能量。在這些植物採集能量後, 棟棟再使用一個能量彙集機器把這些植物採集到的能量彙集到一起。 棟棟的植物種得非常整齊,一共有n列,每列 有m棵,植物的橫豎間

原创 codeforces608D(85/600)

Genos recently installed the game Zuma on his phone. In Zuma there exists a line of n gemstones, the i-th of which

原创 codeforces822D (86/600)

D. My pretty girl Noora time limit per test1.5 seconds memory limit per test256 megabytes inputstandard input o

原创 HDU6058 (76/600)

Problem Description Give you an array A[1..n]of length n. Let f(l,r,k) be the k-th largest element of A[l..r]. Sp

原创 poj2135(84/600)

When FJ’s friends visit him on the farm, he likes to show them around. His farm comprises N (1 <= N <= 1000) fields

原创 HDU6053(72/600)

Problem Description You are given an array A , and Zhu wants to know there are how many different array B satisfy

原创 HDU3625(82/600)

A murder happened in the hotel. As the best detective in the town, you should examine all the N rooms of the hotel

原创 HDU - 6035(71/600)

There is a tree with nn nodes, each of which has a type of color represented by an integer, where the color of node

原创 HDU - 5934(73/600)

here are NN bombs needing exploding. Each bomb has three attributes: exploding radius riri, position (xi,yi)(xi,yi