摘要: Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize 阅读全文
posted @ 2019-07-26 23:03 GRedComeT 阅读(98) 评论(0) 推荐(0) 编辑
摘要: Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the 阅读全文
posted @ 2019-07-26 21:29 GRedComeT 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Given N numbers, X1, X2, ... , XN, let us calculate the difference of every pair of numbers: ∣Xi - Xj∣ (1 ≤ i < j ≤ N). We can get C(N,2) differences 阅读全文
posted @ 2019-07-26 20:36 GRedComeT 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Given a N × N matrix A, whose element in the i-th row and j-th column Aij is an number that equals i2 + 100000 × i + j2 - 100000 × j + i × j, you are 阅读全文
posted @ 2019-07-26 17:33 GRedComeT 阅读(184) 评论(0) 推荐(0) 编辑
摘要: The WHU ACM Team has a big cup, with which every member drinks water. Now, we know the volume of the water in the cup, can you tell us it height? The 阅读全文
posted @ 2019-07-26 15:06 GRedComeT 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 一只木桶能盛多少水,并不取决于桶壁上最高的那块木板,而恰恰取决于桶壁上最短的那块。 已知一个木桶的桶壁由N块木板组成,第i块木板的长度为Ai。 现在小Hi有一个快捷修补工具,每次可以使用修补工具将连续的不超过L块木板提高至任意高度。 已知修补工具一共可以使用M次(M*L<N),如何修补才能使最短的那 阅读全文
posted @ 2019-07-26 14:20 GRedComeT 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi 阅读全文
posted @ 2019-07-26 12:42 GRedComeT 阅读(94) 评论(0) 推荐(0) 编辑