上一页 1 ··· 54 55 56 57 58 59 60 61 62 ··· 67 下一页
摘要: DescriptionIt is a little known fact that cows love apples. Farmer John has two apple trees (which are conveniently numbered 1 and 2) in his field, ea... 阅读全文
posted @ 2015-09-05 18:39 UniqueColor 阅读(206) 评论(0) 推荐(0) 编辑
摘要: DescriptionFarmer John commanded his cows to search for different sets of numbers that sum to a given number. The cows use only numbers that are an in... 阅读全文
posted @ 2015-09-05 16:33 UniqueColor 阅读(267) 评论(0) 推荐(0) 编辑
摘要: DescriptionThe New Year garland consists of N lamps attached to a common wire that hangs down on the ends to which outermost lamps are affixed. The wi... 阅读全文
posted @ 2015-09-05 15:50 UniqueColor 阅读(325) 评论(0) 推荐(0) 编辑
摘要: DescriptionFarmer John wants to set up a telephone line at his farm. Unfortunately, the phone company is uncooperative, so he needs to pay for some of... 阅读全文
posted @ 2015-09-05 15:14 UniqueColor 阅读(364) 评论(0) 推荐(0) 编辑
摘要: DescriptionBessie hears that an extraordinary meteor shower is coming; reports say that these meteors will crash into earth and destroy anything they ... 阅读全文
posted @ 2015-09-04 22:19 UniqueColor 阅读(224) 评论(0) 推荐(0) 编辑
摘要: DescriptionThe N (2 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 #define N 100006 9 int n,m; 10 int tot; 1... 阅读全文
posted @ 2015-09-04 21:19 UniqueColor 阅读(209) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven 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 × ... 阅读全文
posted @ 2015-09-04 20:18 UniqueColor 阅读(234) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven 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) d... 阅读全文
posted @ 2015-09-04 19:21 UniqueColor 阅读(563) 评论(0) 推荐(0) 编辑
摘要: DescriptionFarmer John's N (1 =w1-s2,即w2+s2>=w1+s1,所以和最大的就该老实的在下面呆着= =! 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using name... 阅读全文
posted @ 2015-09-04 18:42 UniqueColor 阅读(228) 评论(0) 推荐(0) 编辑
摘要: DescriptionDemy has n jewels. Each of her jewels has some value vi and weight wi.Since her husband John got broke after recent financial crises, Demy ... 阅读全文
posted @ 2015-09-04 17:52 UniqueColor 阅读(253) 评论(0) 推荐(0) 编辑
上一页 1 ··· 54 55 56 57 58 59 60 61 62 ··· 67 下一页