07 2016 档案

摘要:Bubble Sort Problem Description P is a permutation of the integers from 1 to N(index starting from 1).Here is the code of Bubble Sort in C++. for(int 阅读全文
posted @ 2016-07-29 10:48 枫虹 阅读(209) 评论(0) 推荐(0)
摘要:Dertouzos 题意: 就是给一个n和一个d,问有多少个小于n的数的最大因子是d。 分析: 如果一个数是质数,又和d互质,它们的乘积在范围内的话显然是满足条件的, 如果这个质数和d不互质,那么如果只有这个质数是d最小的质因子时才满足这个条件,其他都不满足, 输入样例 输出样例 阅读全文
posted @ 2016-07-25 16:57 枫虹 阅读(199) 评论(0) 推荐(0)
摘要:E - The Values You Can Make Description Pari wants to buy an expensive chocolate from Arya. She has n coins, the value of the i-th coin is ci. The pri 阅读全文
posted @ 2016-07-16 09:03 枫虹 阅读(252) 评论(0) 推荐(0)
摘要:D - Remainders Game Description Today Pari and Arya are playing a game called Remainders. Pari chooses two positive integer x and k, and tells Arya k  阅读全文
posted @ 2016-07-15 21:30 枫虹 阅读(298) 评论(0) 推荐(0)
摘要:C - NP-Hard Problem Description Recently, Pari and Arya did some research about NP-Hard problems and they found the minimum vertex cover problem very 阅读全文
posted @ 2016-07-14 21:47 枫虹 阅读(217) 评论(0) 推荐(0)
摘要:D - Friends and Subsequences Description Mike and !Mike are old childhood rivals, they are opposite in everything they do, except programming. Today t 阅读全文
posted @ 2016-07-12 21:47 枫虹 阅读(272) 评论(0) 推荐(0)
摘要:C - Mike and Chocolate Thieves Description Bad news came to Mike's village, some thieves stole a bunch of chocolates from the local factory! Horrible! 阅读全文
posted @ 2016-07-11 21:54 枫虹 阅读(172) 评论(0) 推荐(0)
摘要:B - Mike and Shortcuts Description Recently, Mike was very busy with studying for exams and contests. Now he is going to chill a bit by doing some sig 阅读全文
posted @ 2016-07-11 21:45 枫虹 阅读(185) 评论(0) 推荐(0)
摘要:A - Mike and Cellphone Description While swimming at the beach, Mike has accidentally dropped his cellphone into the water. There was no worry as he b 阅读全文
posted @ 2016-07-11 21:35 枫虹 阅读(192) 评论(0) 推荐(0)