Codeforces Round 491 (Div. 2)

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
991 Codeforces Round 491 (Div. 2) FINISHED False 7200 202055099 June 23, 2018, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12664 ) B Getting an A PROGRAMMING greedy sortings 1100

B"Translator's note: in Russia's most widespread grading system, there are four grades: 5, 4, 3, 2, the higher the better, roughly corresponding to A, B, C and F respectively in American grading system. The term is coming to an end and students start thinking about their grades. Today, a professor told his students that the grades for his course would be given out automatically -- he would calculate the simple average (arithmetic mean) of all grades given out for lab works this term and round to the nearest integer. The rounding would be done in favour of the student -- 4.5 would be rounded up to 5 (as in example 3), but 4.4 would be rounded down to 4 . This does not bode well for Vasya who didn't think those lab works would influence anything, so he may receive a grade worse than 5 (maybe even the dreaded 2 ). However, the professor allowed him to redo some of his works of Vasya's choosing to increase his average grade. Vasya wants to redo as as few lab works as possible in order to get 5 for the course. Of course, Vasya will get 5 for the lab works he chooses to redo. Help Vasya -- calculate the minimum amount of lab works Vasya has to redo. The first line contains a single integer n -- the number of Vasya's grades ( 1 <= q n <= q 100 ). The second line contains n integers from 2 to 5 -- Vasya's grades for his lab works. Output a single integer -- the minimum amount of lab works that Vasya has to redo. It can be shown that Vasya can always redo enough lab works to get a 5 . In the first sample, it is enough to redo two lab works to make two 4 s into 5 s. In the second sample, Vasya's average is already 4.75 so he doesn't have to redo anything to get a 5 . In the second sample Vasya has to redo one lab work to get rid of one of the 3 s, that will make the average exactly 4.5 so the final grade would be 5 . "...

Tutorials

60181

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
46469706 vjudge3 B Dec. 2, 2018, 6:48 a.m. OK Clang++17 Diagnostics TESTS 61 46 0 1100
40054506 vjudge2 B July 7, 2018, 7:50 a.m. OK Clang++17 Diagnostics TESTS 61 46 0 1100
39582079 pchvirov B June 23, 2018, 8:44 p.m. OK Delphi TESTS 61 31 102400 1100
44341246 chaorenhaha B Oct. 15, 2018, 3:40 a.m. OK FPC TESTS 61 31 0 1100
46214774 Aschente B Nov. 25, 2018, 5:07 p.m. OK FPC TESTS 61 31 0 1100
47819827 HVP.exe B Jan. 1, 2019, 4:55 p.m. OK FPC TESTS 61 31 0 1100
40263015 luogu_bot3 B July 13, 2018, 1:26 p.m. OK FPC TESTS 61 31 0 1100
39955154 kyrie_lrving B July 4, 2018, 12:32 p.m. OK FPC TESTS 61 31 0 1100
39684909 Bear.-. B June 26, 2018, 7:41 p.m. OK FPC TESTS 61 31 0 1100
39668605 _Time_Lord_ B June 26, 2018, 7:32 a.m. OK FPC TESTS 61 31 0 1100
39595716 PiMat B June 24, 2018, 8:42 a.m. OK FPC TESTS 61 31 0 1100
41265681 FCBM71 B Aug. 6, 2018, 6:58 a.m. OK FPC TESTS 61 31 0 1100
44341020 chaorenhaha B Oct. 15, 2018, 3:27 a.m. OK FPC TESTS 61 31 0 1100
39565895 cherry593 B June 23, 2018, 4:31 p.m. OK GNU C TESTS 61 15 0 1100
39570461 vsowmya1295 B June 23, 2018, 4:53 p.m. OK GNU C TESTS 61 15 0 1100
39659016 mehedihassanrupok B June 25, 2018, 7:40 p.m. OK GNU C TESTS 61 30 0 1100
39605571 Abdullahhassan B June 24, 2018, 2:34 p.m. OK GNU C TESTS 61 30 0 1100
39591714 rishiraje B June 24, 2018, 6:21 a.m. OK GNU C TESTS 61 30 0 1100
39590827 Taj025 B June 24, 2018, 5:45 a.m. OK GNU C TESTS 61 30 0 1100
39568241 mehedi.himel B June 23, 2018, 4:42 p.m. OK GNU C TESTS 61 30 0 1100
39566872 greeshma26 B June 23, 2018, 4:36 p.m. OK GNU C TESTS 61 30 0 1100
39574727 cheesekate B June 23, 2018, 5:18 p.m. OK GNU C TESTS 61 30 16793600 1100
42315090 Totini B Aug. 31, 2018, 4:49 p.m. OK GNU C TESTS 61 31 0 1100
39727382 divyang B June 27, 2018, 8:45 p.m. OK GNU C++ TESTS 61 15 0 1100
39701239 vjudge1 B June 27, 2018, 12:24 p.m. OK GNU C++ TESTS 61 15 0 1100
39673042 wangxwgk B June 26, 2018, 10:47 a.m. OK GNU C++ TESTS 61 15 0 1100
39589430 johnson B June 24, 2018, 4:39 a.m. OK GNU C++ TESTS 61 15 0 1100
39565843 annnnirudh B June 23, 2018, 4:31 p.m. OK GNU C++ TESTS 61 15 0 1100
39565767 er.aks473 B June 23, 2018, 4:31 p.m. OK GNU C++ TESTS 61 15 0 1100
40599064 vjudge5 B July 21, 2018, 7:28 a.m. OK GNU C++ TESTS 61 30 0 1100
40997753 vjudge4 B July 31, 2018, 5:18 a.m. OK GNU C++ TESTS 61 30 0 1100
40771078 vjudge1 B July 26, 2018, 8:36 a.m. OK GNU C++ TESTS 61 30 0 1100
40695770 luogu_bot2 B July 24, 2018, 7:57 a.m. OK GNU C++ TESTS 61 30 0 1100
39605628 LudwigVanBeethoven B June 24, 2018, 2:37 p.m. OK GNU C11 TESTS 61 30 0 1100
68359943 yigezhe B Jan. 7, 2020, 1:42 p.m. OK GNU C11 TESTS 61 31 0 1100
65525348 DevJewel B Nov. 22, 2019, 10:09 a.m. OK GNU C11 TESTS 61 31 0 1100
57265410 vjudge3 B July 18, 2019, 6:57 a.m. OK GNU C11 TESTS 61 31 0 1100
56595336 Watch_Dog_Vintorez B July 5, 2019, 7:06 p.m. OK GNU C11 TESTS 61 31 0 1100
54871218 OKM B May 31, 2019, 9:21 a.m. OK GNU C11 TESTS 61 31 0 1100
46594981 Dhiru634 B Dec. 4, 2018, 2:47 p.m. OK GNU C11 TESTS 61 31 0 1100
46683155 NoSoul B Dec. 6, 2018, 12:55 p.m. OK GNU C11 TESTS 61 31 0 1100
54699190 jephph B May 26, 2019, 9:14 p.m. OK GNU C11 TESTS 61 31 0 1100
47870693 luogu_bot3 B Jan. 3, 2019, 12:41 p.m. OK GNU C11 TESTS 61 31 0 1100
39586495 daifucong B June 24, 2018, 2:05 a.m. OK GNU C++11 TESTS 61 15 0 1100
39701448 Jenni B June 27, 2018, 12:32 p.m. OK GNU C++11 TESTS 61 15 0 1100
39646615 birchtree B June 25, 2018, 10:38 a.m. OK GNU C++11 TESTS 61 15 0 1100
39637589 mohamedsalah50607080904 B June 25, 2018, 4:10 a.m. OK GNU C++11 TESTS 61 15 0 1100
39605339 akash1509 B June 24, 2018, 2:25 p.m. OK GNU C++11 TESTS 61 15 0 1100
39595630 MrMirotic B June 24, 2018, 8:39 a.m. OK GNU C++11 TESTS 61 15 0 1100
39584454 ltf0501 B June 23, 2018, 11:12 p.m. OK GNU C++11 TESTS 61 15 0 1100
68928746 vjudge1 B Jan. 16, 2020, 10:52 a.m. OK GNU C++11 TESTS 61 30 0 1100
53221543 vjudge1 B April 24, 2019, 12:06 p.m. OK GNU C++11 TESTS 61 30 0 1100
47877583 MaRos B Jan. 3, 2019, 4:21 p.m. OK GNU C++11 TESTS 61 30 0 1100
39693188 hasw7569 B June 27, 2018, 6:46 a.m. OK GNU C++14 TESTS 61 15 0 1100
39691368 Fleshik3 B June 27, 2018, 5:07 a.m. OK GNU C++14 TESTS 61 15 0 1100
39688997 woong10sae B June 27, 2018, 2:13 a.m. OK GNU C++14 TESTS 61 15 0 1100
39727531 799169 B June 27, 2018, 8:53 p.m. OK GNU C++14 TESTS 61 15 0 1100
39732116 Rakhman B June 28, 2018, 4:13 a.m. OK GNU C++14 TESTS 61 15 0 1100
39732665 abhyuday07 B June 28, 2018, 4:53 a.m. OK GNU C++14 TESTS 61 15 0 1100
39740724 sersht B June 28, 2018, 11:09 a.m. OK GNU C++14 TESTS 61 15 0 1100
40913863 Piyush_Karira B July 29, 2018, 10:30 a.m. OK GNU C++14 TESTS 61 15 0 1100
42296036 abraham14 B Aug. 31, 2018, 3:12 a.m. OK GNU C++14 TESTS 61 15 0 1100
48581901 .tx B Jan. 19, 2019, 5:03 p.m. OK GNU C++14 TESTS 61 15 0 1100
39606283 DaysGone B June 24, 2018, 3:04 p.m. OK GNU C++17 TESTS 61 15 0 1100
39733169 sophirothwither B June 28, 2018, 5:24 a.m. OK GNU C++17 TESTS 61 15 0 1100
41273826 zhuBbing B Aug. 6, 2018, 12:05 p.m. OK GNU C++17 TESTS 61 15 0 1100
60897630 brute98force B Sept. 19, 2019, 7:31 p.m. OK GNU C++17 TESTS 61 15 0 1100
39671327 ramim B June 26, 2018, 9:27 a.m. OK GNU C++17 TESTS 61 15 0 1100
39661732 AmineBDH B June 25, 2018, 11:54 p.m. OK GNU C++17 TESTS 61 15 0 1100
39640486 Dan389 B June 25, 2018, 6:39 a.m. OK GNU C++17 TESTS 61 15 0 1100
39728430 logens B June 27, 2018, 10:09 p.m. OK GNU C++17 TESTS 61 15 0 1100
39692463 NoCodeNoLife B June 27, 2018, 6:08 a.m. OK GNU C++17 TESTS 61 15 0 1100
39678062 nongi B June 26, 2018, 2:19 p.m. OK GNU C++17 TESTS 61 15 0 1100
43710485 jedikni B Oct. 3, 2018, 3:15 a.m. OK Go TESTS 61 31 0 1100
43101613 Gansito144 B Sept. 20, 2018, 5:41 a.m. OK Go TESTS 61 31 0 1100
43004473 __D__ B Sept. 17, 2018, 3:14 p.m. OK Go TESTS 61 31 0 1100
48115616 _aarif_JU B Jan. 9, 2019, 12:32 p.m. OK Java 8 TESTS 61 109 0 1100
69078090 StEpAn_123 B Jan. 19, 2020, 4:51 a.m. OK Java 8 TESTS 61 109 0 1100
66614441 ijxjdjd B Dec. 11, 2019, 2:17 a.m. OK Java 8 TESTS 61 109 0 1100
57306314 vivek_23 B July 19, 2019, 4:02 a.m. OK Java 8 TESTS 61 109 0 1100
55491089 harshkrr.151 B June 12, 2019, 10:06 a.m. OK Java 8 TESTS 61 109 0 1100
55215835 Mared_Coder B June 6, 2019, 4:40 p.m. OK Java 8 TESTS 61 109 0 1100
54543593 Vatsal53 B May 24, 2019, 4:29 a.m. OK Java 8 TESTS 61 109 0 1100
53493831 CharlesDai B April 29, 2019, 10:32 a.m. OK Java 8 TESTS 61 109 0 1100
49502126 hetshah25 B Feb. 5, 2019, 3:44 p.m. OK Java 8 TESTS 61 109 0 1100
48106356 I.A.K.O.V B Jan. 9, 2019, 5:32 a.m. OK Java 8 TESTS 61 109 0 1100
69648636 vjudge2 B Jan. 28, 2020, 3:37 a.m. OK JavaScript TESTS 61 46 307200 1100
39694739 n.a.borisov B June 27, 2018, 7:51 a.m. OK Mono C# TESTS 61 46 0 1100
39678144 ibastarreche B June 26, 2018, 2:22 p.m. OK Mono C# TESTS 61 46 0 1100
45211143 arseniyworldprogrammer B Nov. 2, 2018, 3:14 p.m. OK Mono C# TESTS 61 46 0 1100
39574128 artworks B June 23, 2018, 5:14 p.m. OK Mono C# TESTS 61 46 3584000 1100
39590610 thirtiseven B June 24, 2018, 5:35 a.m. OK Mono C# TESTS 61 46 70860800 1100
39753226 -PhoeniX- B June 28, 2018, 8:52 p.m. OK Mono C# TESTS 61 61 3481600 1100
39577433 vetedde B June 23, 2018, 5:33 p.m. OK Mono C# TESTS 61 62 3481600 1100
44185045 nemars B Oct. 12, 2018, 12:50 p.m. OK Mono C# TESTS 61 62 3584000 1100
68285664 JSparrow B Jan. 5, 2020, 6:23 p.m. OK Mono C# TESTS 61 62 3584000 1100
47120417 tamunsio B Dec. 16, 2018, 3:12 p.m. OK Mono C# TESTS 61 62 3584000 1100
39690478 vjudge2 B June 27, 2018, 4:04 a.m. OK MS C++ TESTS 61 15 0 1100
64818640 vjudge3 B Nov. 13, 2019, 3:09 p.m. OK MS C++ TESTS 61 30 0 1100
40056662 vjudge4 B July 7, 2018, 9:22 a.m. OK MS C++ TESTS 61 30 0 1100
39582125 nastya1199 B June 23, 2018, 8:46 p.m. OK MS C++ TESTS 61 30 0 1100
39565985 Grigor01 B June 23, 2018, 4:32 p.m. OK MS C++ TESTS 61 30 0 1100
39580348 Vovka B June 23, 2018, 7:48 p.m. OK MS C++ TESTS 61 30 102400 1100
63836880 vjudge2 B Oct. 30, 2019, 2:06 p.m. OK MS C++ TESTS 61 31 0 1100
63262766 vjudge3 B Oct. 23, 2019, 9:16 p.m. OK MS C++ TESTS 61 31 0 1100
64748447 vjudge1 B Nov. 12, 2019, 2:22 p.m. OK MS C++ TESTS 61 31 0 1100
64746992 vjudge5 B Nov. 12, 2019, 1:53 p.m. OK MS C++ TESTS 61 31 0 1100
58159494 IbraheemJanajreh B Aug. 2, 2019, 6:55 a.m. OK MS C++ 2017 TESTS 61 31 0 1100
67316615 DarkManti B Dec. 21, 2019, 6:19 a.m. OK MS C++ 2017 TESTS 61 31 0 1100
63965061 SPMIUniCorn B Nov. 1, 2019, 6:51 a.m. OK MS C++ 2017 TESTS 61 31 0 1100
62414146 mckm2000 B Oct. 12, 2019, 11:09 a.m. OK MS C++ 2017 TESTS 61 31 0 1100
60944783 ahmedo42 B Sept. 20, 2019, 6:26 p.m. OK MS C++ 2017 TESTS 61 31 0 1100
60766982 vjudge5 B Sept. 18, 2019, 11:20 a.m. OK MS C++ 2017 TESTS 61 31 0 1100
57494875 KATAYPEPE B July 22, 2019, 8:14 a.m. OK MS C++ 2017 TESTS 61 31 0 1100
55580421 Mad112233 B June 15, 2019, 6:18 a.m. OK MS C++ 2017 TESTS 61 31 0 1100
54777987 VladKozin B May 28, 2019, 7:11 p.m. OK MS C++ 2017 TESTS 61 31 0 1100
51811712 KKroliKK759 B March 25, 2019, 6:18 a.m. OK MS C++ 2017 TESTS 61 31 0 1100
39943409 secondwtq B July 4, 2018, 5:59 a.m. OK Ocaml TESTS 61 31 0 1100
40018471 olpurgin B July 6, 2018, 4:56 a.m. OK PascalABC.NET TESTS 61 46 102400 1100
39821123 Hitrec B July 1, 2018, 12:27 p.m. OK PascalABC.NET TESTS 61 187 102400 1100
52423665 HiKiTA B April 6, 2019, 6:18 p.m. OK PascalABC.NET TESTS 61 311 0 1100
39566747 anon01 B June 23, 2018, 4:35 p.m. OK Perl TESTS 61 62 102400 1100
39591008 mayakin B June 24, 2018, 5:52 a.m. OK PHP TESTS 61 46 0 1100
39591604 nealzane B June 24, 2018, 6:17 a.m. OK PyPy 2 TESTS 61 93 0 1100
39653307 SerChirag B June 25, 2018, 3:11 p.m. OK PyPy 2 TESTS 61 93 0 1100
39567752 anshuman16423 B June 23, 2018, 4:40 p.m. OK PyPy 2 TESTS 61 108 0 1100
40519475 akshay125 B July 18, 2018, 3:12 p.m. OK PyPy 2 TESTS 61 124 0 1100
39579178 pa.n.ik B June 23, 2018, 7:25 p.m. OK PyPy 2 TESTS 61 124 2560000 1100
39781075 BurntArgonPancakes B June 29, 2018, 8:07 p.m. OK PyPy 2 TESTS 61 139 0 1100
42444902 Arturo_DLG B Sept. 4, 2018, 1:57 a.m. OK PyPy 2 TESTS 61 140 0 1100
42346917 Arturo_DLG B Sept. 1, 2018, 10:40 p.m. OK PyPy 2 TESTS 61 140 0 1100
42345096 Arturo_DLG B Sept. 1, 2018, 8:22 p.m. OK PyPy 2 TESTS 61 140 0 1100
42344395 Arturo_DLG B Sept. 1, 2018, 7:44 p.m. OK PyPy 2 TESTS 61 155 0 1100
39665197 atharva456 B June 26, 2018, 4:29 a.m. OK PyPy 3 TESTS 61 109 0 1100
39577640 shiwanigg997 B June 23, 2018, 5:34 p.m. OK PyPy 3 TESTS 61 124 0 1100
39585580 Asagami B June 24, 2018, 12:59 a.m. OK PyPy 3 TESTS 61 124 0 1100
39568540 MystikNinja B June 23, 2018, 4:44 p.m. OK PyPy 3 TESTS 61 124 0 1100
51231824 morriship B March 12, 2019, 4:38 p.m. OK PyPy 3 TESTS 61 139 0 1100
39592278 shubply B June 24, 2018, 6:41 a.m. OK PyPy 3 TESTS 61 139 0 1100
60381272 kopok2 B Sept. 11, 2019, 9:17 a.m. OK PyPy 3 TESTS 61 139 102400 1100
57506561 kchau B July 22, 2019, 12:14 p.m. OK PyPy 3 TESTS 61 140 0 1100
55672448 tchr B June 17, 2019, 8:27 a.m. OK PyPy 3 TESTS 61 140 0 1100
48061587 Oxho B Jan. 7, 2019, 3:36 p.m. OK PyPy 3 TESTS 61 140 0 1100
39629475 SoSooding B June 24, 2018, 6:46 p.m. OK Python 2 TESTS 61 93 0 1100
39584360 cycle B June 23, 2018, 11:02 p.m. OK Python 2 TESTS 61 108 0 1100
39691398 sanjaygupta251210 B June 27, 2018, 5:09 a.m. OK Python 2 TESTS 61 108 0 1100
39660728 aaarrrgggh B June 25, 2018, 9:55 p.m. OK Python 2 TESTS 61 108 0 1100
39650351 _____ B June 25, 2018, 1:10 p.m. OK Python 2 TESTS 61 108 0 1100
39583775 Carlson.Bimbuh B June 23, 2018, 10:18 p.m. OK Python 2 TESTS 61 108 0 1100
39603326 bary B June 24, 2018, 1:06 p.m. OK Python 2 TESTS 61 109 0 1100
39643602 Ali_Pi B June 25, 2018, 8:43 a.m. OK Python 2 TESTS 61 109 0 1100
39594884 tnowakow B June 24, 2018, 8:12 a.m. OK Python 2 TESTS 61 109 0 1100
39584190 Carlson.Bimbuh B June 23, 2018, 10:49 p.m. OK Python 2 TESTS 61 109 0 1100
39582554 lucas.vieira B June 23, 2018, 9:04 p.m. OK Python 3 TESTS 61 77 0 1100
39652213 vjudge1 B June 25, 2018, 2:22 p.m. OK Python 3 TESTS 61 78 0 1100
39704682 LintuStorm B June 27, 2018, 2:41 p.m. OK Python 3 TESTS 61 78 0 1100
39683383 neeleshsinha B June 26, 2018, 6:13 p.m. OK Python 3 TESTS 61 78 0 1100
39655779 _lucifer_ B June 25, 2018, 5:01 p.m. OK Python 3 TESTS 61 78 0 1100
39607412 Alternation B June 24, 2018, 3:55 p.m. OK Python 3 TESTS 61 78 0 1100
39599405 geya_bagam B June 24, 2018, 10:51 a.m. OK Python 3 TESTS 61 78 0 1100
39595340 umangnangal B June 24, 2018, 8:27 a.m. OK Python 3 TESTS 61 78 0 1100
39591967 strint B June 24, 2018, 6:31 a.m. OK Python 3 TESTS 61 78 0 1100
39591949 Yee_172 B June 24, 2018, 6:30 a.m. OK Python 3 TESTS 61 78 0 1100
39702608 cielavenir B June 27, 2018, 1:21 p.m. OK Ruby TESTS 61 77 0 1100
41669226 betrue12 B Aug. 17, 2018, 3:14 a.m. OK Ruby TESTS 61 77 102400 1100
39585840 jrodrigues B June 24, 2018, 1:22 a.m. OK Rust TESTS 61 31 0 1100
39581972 pifagor97 B June 23, 2018, 8:40 p.m. OK Scala TESTS 61 560 0 1100
39567960 math_botan B June 23, 2018, 4:41 p.m. OK Scala TESTS 61 561 0 1100

remove filters

Back to search problems