Codeforces Round 352 (Div. 1)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
671 Codeforces Round 352 (Div. 1) FINISHED False 7200 268838699 May 11, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3035 ) B Robin Hood PROGRAMMING binary search greedy 2000

B"We all know the impressive story of Robin Hood. Robin Hood uses his archery skills and his wits to steal the money from rich, and return it to the poor. There are n citizens in Kekoland, each person has ci coins. Each day, Robin Hood will take exactly 1 coin from the richest person in the city and he will give it to the poorest person (poorest person right after taking richest's 1 coin). In case the choice is not unique, he will select one among them at random. Sadly, Robin Hood is old and want to retire in k days. He decided to spend these last days with helping poor people. After taking his money are taken by Robin Hood richest person may become poorest person as well, and it might even happen that Robin Hood will give his money back. For example if all people have same number of coins, then next day they will have same number of coins too. Your task is to find the difference between richest and poorest persons wealth after k days. Note that the choosing at random among richest and poorest doesn't affect the answer. The first line of the input contains two integers n and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89500 xe2 x80 x89000, xe2 x80 x890 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the number of citizens in Kekoland and the number of days left till Robin Hood's retirement. The second line contains n integers, the i-th of them is ci (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ci xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- initial wealth of the i-th person. Print a single line containing the difference between richest and poorest peoples wealth. Lets look at how wealth changes through day in the first sample. So the answer is 3 xe2 x80 x89- xe2 x80 x891 xe2 x80 x89= xe2 x80 x892 In second sample wealth will remain the same for each person. "...

Tutorials

Codeforces Round #352 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
17854079 Gassa B May 11, 2016, 5:16 p.m. OK D TESTS 60 217 33587200 2000
66166592 hotboy2703 B Dec. 2, 2019, 7:57 a.m. OK FPC TESTS 60 186 2355200 2000
18148838 LossABike B May 29, 2016, 3:48 p.m. OK FPC TESTS 60 187 3891200 2000
18148833 LossABike B May 29, 2016, 3:47 p.m. OK FPC TESTS 60 187 3891200 2000
22284798 bzh B Nov. 17, 2016, 10:01 a.m. OK FPC TESTS 60 202 3993600 2000
22219758 WalkingDeade B Nov. 15, 2016, 9:51 a.m. OK FPC TESTS 60 202 3993600 2000
18021465 Ahriman B May 21, 2016, 4:23 p.m. OK FPC TESTS 60 202 41881600 2000
18412519 Gray_58 B June 13, 2016, 12:29 p.m. OK FPC TESTS 60 217 3891200 2000
18130476 Sanja B May 28, 2016, 10:56 a.m. OK FPC TESTS 60 218 3788800 2000
18279302 k2nt B June 7, 2016, 6:04 a.m. OK FPC TESTS 60 249 30003200 2000
17926845 ashiqurrahman997 B May 16, 2016, 4:43 a.m. OK GNU C TESTS 60 171 3993600 2000
22409934 rainboy B Nov. 22, 2016, 7:14 p.m. OK GNU C TESTS 60 186 2048000 2000
22406542 rainboy B Nov. 22, 2016, 3:36 p.m. OK GNU C TESTS 60 187 2048000 2000
17865336 pedolove420 B May 11, 2016, 8:02 p.m. OK GNU C TESTS 60 202 4096000 2000
19039976 invisP B July 12, 2016, 2:51 a.m. OK GNU C TESTS 60 218 7987200 2000
41527085 Scut82 B Aug. 12, 2018, 12:32 p.m. OK GNU C++ TESTS 60 62 2048000 2000
32053392 vjudge2 B Nov. 4, 2017, 12:48 p.m. OK GNU C++ TESTS 60 62 3174400 2000
32053346 Magolor B Nov. 4, 2017, 12:46 p.m. OK GNU C++ TESTS 60 62 3174400 2000
26133987 yylidiw B April 5, 2017, 1:22 a.m. OK GNU C++ TESTS 60 62 4096000 2000
28943370 vjudge2 B July 28, 2017, 5:27 a.m. OK GNU C++ TESTS 60 62 8089600 2000
21815362 vjudge4 B Oct. 27, 2016, 8:52 a.m. OK GNU C++ TESTS 60 77 1843200 2000
41514430 Scut82 B Aug. 12, 2018, 5 a.m. OK GNU C++ TESTS 60 77 2252800 2000
17853279 ChiliuDog B May 11, 2016, 5:10 p.m. OK GNU C++ TESTS 60 77 4096000 2000
18490401 Owaski B June 15, 2016, 7:26 a.m. OK GNU C++ TESTS 60 77 4300800 2000
21834638 Commonitorium B Oct. 27, 2016, 8:35 p.m. OK GNU C++ TESTS 60 78 2048000 2000
19856399 shadowatyy B Aug. 13, 2016, 6:34 p.m. OK GNU C++11 TESTS 60 62 4096000 2000
18227102 PPFish B June 3, 2016, 6:40 a.m. OK GNU C++11 TESTS 60 62 4198400 2000
18152197 NanoApe B May 30, 2016, 1:26 a.m. OK GNU C++11 TESTS 60 62 8089600 2000
17856669 dnvtmf B May 11, 2016, 5:40 p.m. OK GNU C++11 TESTS 60 62 8294400 2000
17853960 savinov B May 11, 2016, 5:15 p.m. OK GNU C++11 TESTS 60 77 4198400 2000
40984479 ReaLNero1 B July 30, 2018, 7:24 p.m. OK GNU C++11 TESTS 60 77 6041600 2000
64436630 luogu_bot2 B Nov. 7, 2019, 1:47 a.m. OK GNU C++11 TESTS 60 78 2048000 2000
45856620 KING_LRL B Nov. 17, 2018, 2:30 a.m. OK GNU C++11 TESTS 60 78 2048000 2000
56642264 zrmpaul B July 7, 2019, 3:01 a.m. OK GNU C++11 TESTS 60 78 3993600 2000
56642202 LittleBaby B July 7, 2019, 2:58 a.m. OK GNU C++11 TESTS 60 78 3993600 2000
50513824 nong B Feb. 26, 2019, 4:31 a.m. OK GNU C++14 TESTS 60 124 2048000 2000
20909050 osama.alb96 B Sept. 25, 2016, 1:42 p.m. OK GNU C++14 TESTS 60 140 1945600 2000
25597802 platypus179 B March 18, 2017, 10:50 a.m. OK GNU C++14 TESTS 60 140 58470400 2000
56671173 Phortox B July 7, 2019, 1:12 p.m. OK GNU C++14 TESTS 60 155 3993600 2000
56671077 Phortox B July 7, 2019, 1:09 p.m. OK GNU C++14 TESTS 60 155 3993600 2000
54465813 tera_daddy B May 21, 2019, 11:28 p.m. OK GNU C++14 TESTS 60 156 2048000 2000
25145369 luosuocumt_16 B March 2, 2017, 10:51 a.m. OK GNU C++14 TESTS 60 156 3891200 2000
31855953 sharpblade95 B Oct. 29, 2017, 4:54 a.m. OK GNU C++14 TESTS 60 171 2048000 2000
31738603 Fullmetal_Algorithmist B Oct. 26, 2017, 1:24 p.m. OK GNU C++14 TESTS 60 171 2048000 2000
27687387 Light B June 9, 2017, 10:55 a.m. OK GNU C++14 TESTS 60 171 2048000 2000
59950126 Lrztxdy B Sept. 3, 2019, 2:15 p.m. OK GNU C++17 TESTS 60 124 1945600 2000
45756353 Caturra B Nov. 15, 2018, 6:10 a.m. OK GNU C++17 TESTS 60 155 2252800 2000
45756949 vjudge3 B Nov. 15, 2018, 6:34 a.m. OK GNU C++17 TESTS 60 156 2252800 2000
52223384 JoJo B April 2, 2019, 7:56 a.m. OK GNU C++17 TESTS 60 171 2048000 2000
47354890 ConferenceCall B Dec. 22, 2018, 5:42 a.m. OK GNU C++17 TESTS 60 171 2048000 2000
55249973 vjudge1 B June 7, 2019, 12:22 p.m. OK GNU C++17 TESTS 60 171 3993600 2000
50575437 vjudge5 B Feb. 27, 2019, 5:48 p.m. OK GNU C++17 TESTS 60 171 6041600 2000
63873410 harsha2empire B Oct. 30, 2019, 6:12 p.m. OK GNU C++17 TESTS 60 186 2048000 2000
62120375 yuma_ B Oct. 8, 2019, 2:29 p.m. OK GNU C++17 TESTS 60 186 5222400 2000
63289695 vjudge2 B Oct. 24, 2019, 11:25 a.m. OK GNU C++17 TESTS 60 187 2048000 2000
26607221 Martynas B April 23, 2017, 2:15 p.m. OK Go TESTS 60 187 26009600 2000
34939180 vjudge1 B Feb. 5, 2018, 9:13 a.m. OK Go TESTS 60 265 28057600 2000
34939152 megaspazz B Feb. 5, 2018, 9:12 a.m. OK Go TESTS 60 265 28057600 2000
17915108 228 B May 15, 2016, 3:57 a.m. OK Java 7 TESTS 60 280 79257600 2000
17872855 alibaba B May 12, 2016, 9:22 a.m. OK Java 7 TESTS 60 358 83251200 2000
18446755 Genericcoder B June 14, 2016, 8:39 a.m. OK Java 7 TESTS 60 529 82944000 2000
17852470 uwi B May 11, 2016, 5:04 p.m. OK Java 8 TESTS 60 170 20684800 2000
17861690 Wolfje B May 11, 2016, 6:28 p.m. OK Java 8 TESTS 60 234 20889600 2000
19444040 hama-du B July 27, 2016, 2:32 p.m. OK Java 8 TESTS 60 265 2764800 2000
40669207 vjudge4 B July 23, 2018, 11:42 a.m. OK Java 8 TESTS 60 280 0 2000
36573664 Golmol B March 24, 2018, 12:13 p.m. OK Java 8 TESTS 60 280 20684800 2000
36573637 Golmol B March 24, 2018, 12:12 p.m. OK Java 8 TESTS 60 280 20684800 2000
17853635 Sumeet.Varma B May 11, 2016, 5:12 p.m. OK Java 8 TESTS 60 295 20582400 2000
28463575 vjudge1 B July 12, 2017, 6:16 a.m. OK Java 8 TESTS 60 295 20889600 2000
25445275 dayepesb B March 13, 2017, 12:57 a.m. OK Java 8 TESTS 60 295 57241600 2000
17981165 dhrumil140396 B May 18, 2016, 2:19 p.m. OK Java 8 TESTS 60 296 20582400 2000
17859645 Beresta B May 11, 2016, 6:09 p.m. OK MS C# TESTS 60 217 20582400 2000
17858470 azukun B May 11, 2016, 5:57 p.m. OK MS C# TESTS 60 342 69734400 2000
17876799 camypaper B May 12, 2016, 1:57 p.m. OK MS C# TESTS 60 358 15462400 2000
17875859 camypaper B May 12, 2016, 12:58 p.m. OK MS C# TESTS 60 748 49459200 2000
19944609 vjudge5 B Aug. 18, 2016, 10:53 a.m. OK MS C++ TESTS 60 124 4096000 2000
17853782 LLI_E_P_JI_O_K B May 11, 2016, 5:13 p.m. OK MS C++ TESTS 60 139 6246400 2000
50585604 vjudge4 B Feb. 28, 2019, 3:17 a.m. OK MS C++ TESTS 60 140 3993600 2000
28573383 vjudge2 B July 15, 2017, 12:39 p.m. OK MS C++ TESTS 60 140 4096000 2000
18460126 TonySnark B June 14, 2016, 4:49 p.m. OK MS C++ TESTS 60 140 8192000 2000
50562592 vjudge4 B Feb. 27, 2019, 11:48 a.m. OK MS C++ TESTS 60 140 12083200 2000
19944570 mark_liu B Aug. 18, 2016, 10:51 a.m. OK MS C++ TESTS 60 140 12083200 2000
19941898 vjudge1 B Aug. 18, 2016, 7:49 a.m. OK MS C++ TESTS 60 155 4096000 2000
17852480 Vedensky B May 11, 2016, 5:04 p.m. OK MS C++ TESTS 60 155 4198400 2000
17855646 Auster B May 11, 2016, 5:30 p.m. OK MS C++ TESTS 60 155 6246400 2000
61118679 CtrlAlt B Sept. 23, 2019, 1:43 p.m. OK MS C++ 2017 TESTS 60 187 2048000 2000
17896586 orailly B May 14, 2016, 2:03 a.m. OK PyPy 2 TESTS 60 311 53760000 2000
18117757 SkyFire B May 27, 2016, 12:07 p.m. OK PyPy 2 TESTS 60 358 53862400 2000
17877398 zzz1322 B May 12, 2016, 2:36 p.m. OK PyPy 2 TESTS 60 421 54579200 2000
18116993 SkyFire B May 27, 2016, 11:22 a.m. OK PyPy 2 TESTS 60 436 53760000 2000
32439909 yugle7 B Nov. 18, 2017, 7:21 p.m. OK PyPy 3 TESTS 60 873 78438400 2000
17896568 orailly B May 14, 2016, 1:59 a.m. OK PyPy 3 TESTS 60 904 78028800 2000
17877412 zzz1322 B May 12, 2016, 2:37 p.m. OK PyPy 3 TESTS 60 950 76902400 2000
17877380 zzz1322 B May 12, 2016, 2:35 p.m. OK PyPy 3 TESTS 60 967 76595200 2000
17866876 llllllll B May 11, 2016, 10:34 p.m. OK Python 2 TESTS 60 763 31846400 2000
17896665 orailly B May 14, 2016, 2:18 a.m. OK Python 2 TESTS 60 763 31948800 2000
18050675 house1993 B May 24, 2016, 5:14 a.m. OK Python 2 TESTS 60 811 31846400 2000
17896683 orailly B May 14, 2016, 2:23 a.m. OK Python 2 TESTS 60 842 31744000 2000
18050727 house1993 B May 24, 2016, 5:22 a.m. OK Python 2 TESTS 60 966 33792000 2000
18116954 SkyFire B May 27, 2016, 11:20 a.m. OK Python 2 TESTS 60 982 31846400 2000
17921702 WeakChicken B May 15, 2016, 3:40 p.m. OK Python 2 TESTS 60 982 33689600 2000
18043537 LiaoPengyu B May 23, 2016, 12:34 p.m. OK Python 2 TESTS 60 997 38502400 2000
19108010 bazyar.sepehr B July 14, 2016, 12:56 p.m. OK Python 3 TESTS 60 810 39219200 2000
42128856 Mk_Python_v1 B Aug. 26, 2018, 5:03 p.m. OK Python 3 TESTS 60 935 38912000 2000
66084289 NocturneBflat B Dec. 1, 2019, 3:16 a.m. OK Python 3 TESTS 60 998 42393600 2000

remove filters

Back to search problems