上一页 1 2 3 4 5 6 7 ··· 17 下一页
摘要: 1201 整数划分 基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 将N分为若干个不同整数的和,有多少种不同的划分方式,例如:n = 6,{6} {1,5} {2,4} {1,2,3},共4种。由于数据较大,输出Mod 10^9 + 7的结果即可。 Input 输 阅读全文
posted @ 2016-03-07 20:12 yanzx6 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 1175 区间中第K大的数 基准时间限制:1 秒 空间限制:131072 KB 分值: 160 难度:6级算法题 一个长度为N的整数序列,编号0 - N - 1。进行Q次查询,查询编号i至j的所有数中,第K大的数是多少。 例如: 1 7 6 3 1。i = 1, j = 3,k = 2,对应的数为7 阅读全文
posted @ 2016-03-04 21:07 yanzx6 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 线性筛法: 1 for(int i = 2; i < MAXPRIME; i++) 2 { 3 if(!visit[i]) prime[tot++] = i; 4 for(int j = 0; j < tot; j++) 5 { 6 if(i * prime[j] >= MAXPRIME) brea 阅读全文
posted @ 2016-03-04 11:56 yanzx6 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 2071. Juice Cocktails Time limit: 1.0 secondMemory limit: 64 MB Once n Denchiks come to the bar and each orders a juice cocktail. It could be from 1 t 阅读全文
posted @ 2016-03-04 11:14 yanzx6 阅读(371) 评论(0) 推荐(0) 编辑
摘要: 2073. Log Files Time limit: 1.0 secondMemory limit: 64 MB Nikolay has decided to become the best programmer in the world! Now he regularly takes part 阅读全文
posted @ 2016-03-04 11:14 yanzx6 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 2070. Interesting Numbers Time limit: 2.0 secondMemory limit: 64 MB Nikolay and Asya investigate integers together in their spare time. Nikolay thinks 阅读全文
posted @ 2016-03-04 10:54 yanzx6 阅读(415) 评论(0) 推荐(0) 编辑
摘要: 2069. Hard Rock Time limit: 1.0 secondMemory limit: 64 MB Ilya is a frontman of the most famous rock band on Earth. Band decided to make the most awes 阅读全文
posted @ 2016-03-04 10:47 yanzx6 阅读(473) 评论(0) 推荐(0) 编辑
摘要: 2068. Game of Nuts Time limit: 1.0 secondMemory limit: 64 MB The war for Westeros is still in process, manpower and supplies are coming to an end and 阅读全文
posted @ 2016-03-04 10:37 yanzx6 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 2067. Friends and Berries Time limit: 2.0 secondMemory limit: 64 MB There is a group of n children. According to a proverb, every man to his own taste 阅读全文
posted @ 2016-03-04 10:30 yanzx6 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 2066. Simple Expression Time limit: 1.0 secondMemory limit: 64 MB You probably know that Alex is a very serious mathematician and he likes to solve se 阅读全文
posted @ 2016-03-04 10:26 yanzx6 阅读(292) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 17 下一页