随笔分类 -  ACM---不光是查找值!“二分搜索”

摘要:Problem Description ztr loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation doesn't contain digits o 阅读全文
posted @ 2016-05-02 19:20 UniqueColor 阅读(451) 评论(0) 推荐(0) 编辑
摘要:Description: You are given a matrix which is n rows m columns (1 yj的边,然后对二分图跑最大匹配,如果最大匹配数>=n-k+1,则ansmid 1 #pragma comment(linker, "/STACK:102400000... 阅读全文
posted @ 2015-10-11 22:03 UniqueColor 阅读(274) 评论(0) 推荐(0) 编辑
摘要:DescriptionAfter a day trip with his friend Dick, Harry noticed a strange pattern of tiny holes in the door of his SUV. The local American Tire store ... 阅读全文
posted @ 2015-09-24 10:54 UniqueColor 阅读(321) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionMr. West bought a new car! So he is travelling around the city.One day he comes to a vertical corner. The street he is currently in... 阅读全文
posted @ 2015-09-23 22:05 UniqueColor 阅读(281) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionIn the Dark forest, there is a Fairy kingdom where all the spirits will go together and Celebrate the harvest every year. But there... 阅读全文
posted @ 2015-09-23 20:38 UniqueColor 阅读(357) 评论(0) 推荐(0) 编辑
摘要:DescriptionFarmer John's farm has N barns, and there are some cows that live in each barn. The cows like to drop around, so John wants to build some r... 阅读全文
posted @ 2015-09-17 19:34 UniqueColor 阅读(226) 评论(0) 推荐(0) 编辑
摘要:DescriptionRatish is a young man who always dreams of being a hero. One day his friend Luffy was caught by Pirate Arlong. Ratish set off at once to Ar... 阅读全文
posted @ 2015-09-17 17:45 UniqueColor 阅读(283) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionXiao Ming is a citizen who's good at playing,he has lot's of gold cones which have square undersides,let's call them pyramids.Anyon... 阅读全文
posted @ 2015-09-12 22:09 UniqueColor 阅读(186) 评论(0) 推荐(0) 编辑
摘要:Problem Description我们有一个数列A1,A2...An,你现在要求修改数量最少的元素,使得这个数列严格递增。其中无论是修改前还是修改后,每个元素都必须是整数。请输出最少需要修改多少个元素。Input第一行输入一个T(1≤T≤10),表示有多少组数据每一组数据:第一行输入一个N(1≤... 阅读全文
posted @ 2015-09-11 21:02 UniqueColor 阅读(197) 评论(0) 推荐(0) 编辑
摘要:Problem Description给定序列A={A1,A2,...,An}, 要求改变序列A中的某些元素,形成一个严格单调的序列B(严格单调的定义为:Bi 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 us... 阅读全文
posted @ 2015-09-11 20:54 UniqueColor 阅读(281) 评论(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 阅读(328) 评论(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 阅读(368) 评论(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 阅读(236) 评论(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 阅读(564) 评论(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 阅读(231) 评论(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 阅读(255) 评论(0) 推荐(0) 编辑
摘要:DescriptionIn a certain course, you take n tests. If you get ai out of bi questions correct on test i, your cumulative average is defined to be ..Gi... 阅读全文
posted @ 2015-09-04 17:27 UniqueColor 阅读(237) 评论(0) 推荐(0) 编辑
摘要:DescriptionIt is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. J... 阅读全文
posted @ 2015-09-03 20:03 UniqueColor 阅读(610) 评论(0) 推荐(0) 编辑
摘要:DescriptionFarmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and re... 阅读全文
posted @ 2015-09-03 18:52 UniqueColor 阅读(218) 评论(0) 推荐(0) 编辑
摘要:DescriptionFarmer John has built a new long barn, with N (2 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 #define N... 阅读全文
posted @ 2015-09-03 17:57 UniqueColor 阅读(250) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示