
二分法
文章平均质量分 79
A_ice_
1111
展开
-
LightOJ 1076 Get the Containers
K - Get the ContainersTime Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %lluSubmit Status Practice LightOJ 1076DescriptionA conveyor belt has a number of vessels原创 2016-04-21 21:15:03 · 520 阅读 · 0 评论 -
LightOJ 1138 Trailing Zeroes (III)
题目:http://lightoj.com/login_main.php?url=volume_showproblem.php?problem=1138这是个二分TAT……分的是5的个数。因为末尾有0就是乘以10,10是由2*5得出来的。在N!里面2比5多得多,所以只用算5的个数就可以了。5的个数的算法具体看代码吧,我觉得比较奇妙。#include#include原创 2016-08-24 09:12:56 · 458 阅读 · 0 评论 -
【多校】ZZULIOJ 1919 D
1919: DTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 241 Solved: 69Description晴天想把一个包含n个整数的序列a分成连续的若干段,且和最大的一段的值最小,但他有强迫症,分的段数不能超过m段,然后他就不会分了。。。他想问你这个分出来的和最大的一段的和最小值是多少?Input原创 2016-08-18 09:31:41 · 419 阅读 · 0 评论 -
CodeForces 348A Mafia
A. Mafiatime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day n friends gathered together to play "Mafia原创 2016-07-27 21:00:47 · 499 阅读 · 0 评论 -
CodeForces 371C Hamburgers
C. Hamburgerstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarpus loves hamburgers very much. He espe原创 2016-07-27 20:38:36 · 388 阅读 · 0 评论 -
CodeForces 448D Multiplication Table
D. Multiplication Tabletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBizon the Champion isn't just charmi原创 2016-07-27 20:16:57 · 486 阅读 · 0 评论 -
NBUT 1651 Red packet
[1651] Red packet时间限制: 1000 ms 内存限制: 65535 K问题描述New Year is coming! Our big boss Wine93 will distribute some “Red Package”, just like Alipay and Wechat.Wine93 has m yuan, he decides to原创 2016-07-27 20:09:07 · 384 阅读 · 0 评论 -
HDOJ 4907 Task schedule【思维】
Task scheduleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2757 Accepted Submission(s): 938Problem Description有一台机器,并且给你这台机器的工作原创 2016-07-26 20:22:27 · 376 阅读 · 0 评论 -
HDOJ 1969 Pie
PieTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9241 Accepted Submission(s): 3345Problem DescriptionMy birthday is coming up a原创 2016-07-26 20:15:00 · 313 阅读 · 0 评论 -
HDOJ 4004 The Frog's Games
The Frog's GamesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 6113 Accepted Submission(s): 2967Problem DescriptionThe annual Ga原创 2016-07-26 20:01:33 · 375 阅读 · 0 评论 -
HDOJ 2141 Can you find it?
Can you find it?Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/10000 K (Java/Others)Total Submission(s): 23726 Accepted Submission(s): 6002Problem DescriptionGive you th原创 2016-07-26 19:54:37 · 271 阅读 · 0 评论 -
HDOJ 1551 Cable master
Cable masterTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3795 Accepted Submission(s): 1460Problem DescriptionInhabitants of th原创 2016-07-26 19:50:23 · 277 阅读 · 0 评论 -
HDOJ 2199 Can you solve this equation?【水】
Can you solve this equation?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16573 Accepted Submission(s): 7357Problem Description原创 2016-07-26 19:45:20 · 402 阅读 · 0 评论 -
【PTA】5-9 集合相似度 (25分)
5-9 集合相似度 (25分)给定两个整数集合,它们的相似度定义为:N_c / N_t \times 100\%Nc/Nt×100%。其中N_cNc是两个集合都有的不相等整数的个数,N_tNt是两个集合一共有的不相等整数的个数。你的任务就是计算任意一对给定集合的相似度。输入格式:输入第一行给出一个正整数NN(\le 50≤50),是集原创 2017-03-21 19:56:32 · 1689 阅读 · 0 评论