Codeforces Round 420 (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
821 Codeforces Round 420 (Div. 2) FINISHED False 8100 238778663 June 25, 2017, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5808 ) B Okabe and Banana Trees PROGRAMMING brute force math 1300

B"Okabe needs bananas for one of his experiments for some strange reason. So he decides to go to the forest and cut banana trees. Consider the point (x, xe2 x80 x89y) in the 2D plane such that x and y are integers and 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x, xe2 x80 x89y. There is a tree in such a point, and it has x xe2 x80 x89+ xe2 x80 x89y bananas. There are no trees nor bananas in other points. Now, Okabe draws a line with equation . Okabe can select a single rectangle with axis aligned sides with all points on or under the line and cut all the trees in all points that are inside or on the border of this rectangle and take their bananas. Okabe's rectangle can be degenerate; that is, it can be a line segment or even a point. Help Okabe and find the maximum number of bananas he can get if he chooses the rectangle wisely. Okabe is sure that the answer does not exceed 1018. You can trust him. The first line of input contains two space-separated integers m and b (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89b xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8910000). Print the maximum number of bananas Okabe can get from the trees he cuts. The graph above corresponds to sample test 1. The optimal rectangle is shown in red and has 30 bananas. "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
28030498 nanae1914 B June 25, 2017, 3:28 p.m. OK D TESTS 38 327 2969600 1300
28028375 ruban B June 25, 2017, 3:13 p.m. OK Delphi TESTS 38 15 2560000 1300
29039954 vjudge2 B July 31, 2017, 7:21 a.m. OK FPC TESTS 38 15 1638400 1300
29040414 vjudge1 B July 31, 2017, 7:33 a.m. OK FPC TESTS 38 15 1638400 1300
29043145 vjudge1 B July 31, 2017, 8:53 a.m. OK FPC TESTS 38 15 1638400 1300
29043311 vjudge2 B July 31, 2017, 8:59 a.m. OK FPC TESTS 38 15 1638400 1300
29046300 vjudge4 B July 31, 2017, 11:17 a.m. OK FPC TESTS 38 15 1638400 1300
31510639 vjudge5 B Oct. 19, 2017, 2:04 p.m. OK FPC TESTS 38 15 1638400 1300
29039709 vjudge1 B July 31, 2017, 7:14 a.m. OK FPC TESTS 38 15 1638400 1300
29039781 vjudge2 B July 31, 2017, 7:16 a.m. OK FPC TESTS 38 15 1638400 1300
29039700 vjudge2 B July 31, 2017, 7:14 a.m. OK FPC TESTS 38 15 1638400 1300
29039861 vjudge2 B July 31, 2017, 7:18 a.m. OK FPC TESTS 38 15 1638400 1300
34539520 swargo98 B Jan. 25, 2018, 7:56 a.m. OK GNU C TESTS 38 15 1843200 1300
34327201 MYNAMEISSHARIFUL B Jan. 19, 2018, 5:26 p.m. OK GNU C TESTS 38 15 1843200 1300
28074715 swhat B June 27, 2017, 10:47 a.m. OK GNU C TESTS 38 15 1843200 1300
28935544 gbrocks B July 27, 2017, 5:40 p.m. OK GNU C TESTS 38 15 1945600 1300
28774529 jk15171217 B July 22, 2017, 9:15 a.m. OK GNU C TESTS 38 15 1945600 1300
28345720 narang9958875313 B July 7, 2017, 8:53 a.m. OK GNU C TESTS 38 15 1945600 1300
28316610 AltF4 B July 6, 2017, 5:20 a.m. OK GNU C TESTS 38 15 1945600 1300
28285339 abhishekans21 B July 4, 2017, 4:36 p.m. OK GNU C TESTS 38 15 1945600 1300
28213191 q843705423 B July 2, 2017, 3:38 p.m. OK GNU C TESTS 38 15 1945600 1300
28171943 koderliar B June 30, 2017, 12:41 p.m. OK GNU C TESTS 38 15 1945600 1300
32287007 vjudge2 B Nov. 13, 2017, 2:34 p.m. OK GNU C++ TESTS 38 15 0 1300
32246624 vjudge1 B Nov. 12, 2017, 2:50 p.m. OK GNU C++ TESTS 38 15 0 1300
32073556 saurabhag21_ ayush1008 B Nov. 5, 2017, 10:36 a.m. OK GNU C++ TESTS 38 15 0 1300
32052494 vjudge3 B Nov. 4, 2017, 12:16 p.m. OK GNU C++ TESTS 38 15 0 1300
31952140 vjudge5 B Nov. 1, 2017, 1:48 p.m. OK GNU C++ TESTS 38 15 0 1300
31716703 code_crusher ab_hi_shek shekhar483 B Oct. 25, 2017, 3:58 p.m. OK GNU C++ TESTS 38 15 0 1300
31318800 shivam52548 B Oct. 14, 2017, 5:04 p.m. OK GNU C++ TESTS 38 15 0 1300
31271469 vjudge4 B Oct. 13, 2017, 10:41 a.m. OK GNU C++ TESTS 38 15 0 1300
30569525 vjudge4 B Sept. 21, 2017, 7:45 a.m. OK GNU C++ TESTS 38 15 0 1300
30567989 vjudge5 B Sept. 21, 2017, 6:07 a.m. OK GNU C++ TESTS 38 15 0 1300
39464490 anupreet.bhatia B June 21, 2018, 2:10 p.m. OK GNU C11 TESTS 38 15 0 1300
34257860 cr7_sah B Jan. 17, 2018, 5:05 p.m. OK GNU C11 TESTS 38 15 1843200 1300
28043071 four B June 25, 2017, 7:28 p.m. OK GNU C11 TESTS 38 15 1945600 1300
28048821 fsociety00 B June 26, 2017, 4:47 a.m. OK GNU C11 TESTS 38 15 1945600 1300
59826959 kaiboy B Aug. 31, 2019, 8 p.m. OK GNU C11 TESTS 38 31 0 1300
28028829 Jeel_Vaishnav B June 25, 2017, 3:16 p.m. OK GNU C11 TESTS 38 140 1945600 1300
28040189 mohit15060 B June 25, 2017, 4:49 p.m. OK GNU C11 TESTS 38 358 1945600 1300
28110527 FromSaffronCity B June 28, 2017, 7:45 a.m. OK GNU C11 TESTS 38 405 1945600 1300
59411626 vjudge1 B Aug. 24, 2019, 4:06 p.m. OK GNU C11 TESTS 38 904 0 1300
30801203 REEED B Sept. 28, 2017, 10:20 a.m. OK GNU C++11 TESTS 38 15 0 1300
30814134 abhiavrondi B Sept. 28, 2017, 7:08 p.m. OK GNU C++11 TESTS 38 15 0 1300
31092799 4llower B Oct. 6, 2017, 8:25 p.m. OK GNU C++11 TESTS 38 15 0 1300
31226599 pawelzell B Oct. 11, 2017, 7:43 p.m. OK GNU C++11 TESTS 38 15 0 1300
31271300 mihai.alpha B Oct. 13, 2017, 10:33 a.m. OK GNU C++11 TESTS 38 15 0 1300
31312965 quailty B Oct. 14, 2017, 1:45 p.m. OK GNU C++11 TESTS 38 15 0 1300
31873959 mostafa_mohamed22 B Oct. 29, 2017, 5:57 p.m. OK GNU C++11 TESTS 38 15 0 1300
31874718 nonis B Oct. 29, 2017, 6:33 p.m. OK GNU C++11 TESTS 38 15 0 1300
32008762 N3SL B Nov. 3, 2017, 1:40 p.m. OK GNU C++11 TESTS 38 15 0 1300
32205274 Melzar B Nov. 10, 2017, 8:16 p.m. OK GNU C++11 TESTS 38 15 0 1300
56441646 sdasr B July 2, 2019, 4:43 p.m. OK GNU C++14 TESTS 38 15 0 1300
43464261 Trippy_max B Sept. 26, 2018, 6:09 p.m. OK GNU C++14 TESTS 38 15 0 1300
32548126 nong B Nov. 22, 2017, 11:23 a.m. OK GNU C++14 TESTS 38 15 0 1300
32517875 ACGoxy B Nov. 21, 2017, 6:53 a.m. OK GNU C++14 TESTS 38 15 0 1300
32355191 -faraday_anshul- B Nov. 16, 2017, 12:42 p.m. OK GNU C++14 TESTS 38 15 0 1300
32316205 Em00n B Nov. 14, 2017, 4:10 p.m. OK GNU C++14 TESTS 38 15 0 1300
32287664 code_master5 B Nov. 13, 2017, 3:07 p.m. OK GNU C++14 TESTS 38 15 0 1300
31960349 wewakeprasad B Nov. 1, 2017, 6:42 p.m. OK GNU C++14 TESTS 38 15 0 1300
31928621 sergio0101 B Oct. 31, 2017, 5:16 p.m. OK GNU C++14 TESTS 38 15 0 1300
31924193 shubhu1596 wewakeprasad FatherofBenoni B Oct. 31, 2017, 2:25 p.m. OK GNU C++14 TESTS 38 15 0 1300
39046878 Akikaze B June 8, 2018, 1:07 p.m. OK GNU C++17 TESTS 38 15 0 1300
39530062 asdefi B June 23, 2018, 1:12 a.m. OK GNU C++17 TESTS 38 15 0 1300
63884086 vjudge5 B Oct. 30, 2019, 11:07 p.m. OK GNU C++17 TESTS 38 15 0 1300
45589539 klchen0112 B Nov. 12, 2018, 11:30 a.m. OK GNU C++17 TESTS 38 15 307200 1300
35177993 giorgi B Feb. 12, 2018, 12:46 p.m. OK GNU C++17 TESTS 38 15 2048000 1300
36232070 ShapeBlaze B March 12, 2018, 6:14 p.m. OK GNU C++17 TESTS 38 15 2048000 1300
68053651 dhiraj_7_ B Jan. 1, 2020, 8:29 p.m. OK GNU C++17 TESTS 38 30 0 1300
68099157 vjudge1 B Jan. 3, 2020, 12:22 a.m. OK GNU C++17 TESTS 38 30 0 1300
68757239 vjudge1 B Jan. 14, 2020, 8:18 a.m. OK GNU C++17 TESTS 38 30 0 1300
68836757 vjudge2 B Jan. 15, 2020, 3:40 a.m. OK GNU C++17 TESTS 38 30 0 1300
28039050 Leonardone B June 25, 2017, 4:39 p.m. OK Go TESTS 38 31 6041600 1300
28071700 ralekseenkov B June 27, 2017, 8:05 a.m. OK Go TESTS 38 234 39014400 1300
28037490 yuki2006 B June 25, 2017, 4:25 p.m. OK Go TESTS 38 249 23040000 1300
30571481 harryoooooooooo B Sept. 21, 2017, 8:49 a.m. OK Haskell TESTS 38 15 8396800 1300
28051529 uc-nuts B June 26, 2017, 7:22 a.m. OK Haskell TESTS 38 15 44851200 1300
28051433 uc-nuts B June 26, 2017, 7:18 a.m. OK Haskell TESTS 38 15 44851200 1300
28030097 hhandleh B June 25, 2017, 3:25 p.m. OK Haskell TESTS 38 15 44851200 1300
28027318 kost B June 25, 2017, 3:06 p.m. OK Haskell TESTS 38 15 44851200 1300
28027123 cojna B June 25, 2017, 3:05 p.m. OK Haskell TESTS 38 15 53350400 1300
29827872 shifona B Aug. 27, 2017, 1:51 p.m. OK Java 8 TESTS 38 108 0 1300
28036030 saitama_rox B June 25, 2017, 4:11 p.m. OK Java 8 TESTS 38 108 20582400 1300
28029658 Golmol B June 25, 2017, 3:22 p.m. OK Java 8 TESTS 38 108 20582400 1300
53895288 mikit B May 9, 2019, 5:22 a.m. OK Java 8 TESTS 38 109 0 1300
31183014 Coder.Kei B Oct. 10, 2017, 7:10 a.m. OK Java 8 TESTS 38 109 0 1300
28035884 anmolsinghal96 B June 25, 2017, 4:09 p.m. OK Java 8 TESTS 38 109 20172800 1300
28055826 Psp_98 B June 26, 2017, 10:59 a.m. OK Java 8 TESTS 38 109 20172800 1300
28027261 Dekacc B June 25, 2017, 3:06 p.m. OK Java 8 TESTS 38 109 20172800 1300
28032650 quandum B June 25, 2017, 3:43 p.m. OK Java 8 TESTS 38 109 20275200 1300
28029908 vidyut_1 B June 25, 2017, 3:24 p.m. OK Java 8 TESTS 38 109 20275200 1300
28028133 serejkee B June 25, 2017, 3:12 p.m. OK Kotlin TESTS 38 109 20582400 1300
28026242 dened B June 25, 2017, 3 p.m. OK Kotlin TESTS 38 1357 20684800 1300
28027385 kuuso B June 25, 2017, 3:07 p.m. OK Mono C# TESTS 38 46 9113600 1300
28027613 leign B June 25, 2017, 3:08 p.m. OK Mono C# TESTS 38 46 9113600 1300
28025870 riantkb B June 25, 2017, 2:57 p.m. OK Mono C# TESTS 38 61 9318400 1300
28042163 Drinker B June 25, 2017, 6:36 p.m. OK Mono C# TESTS 38 62 11673600 1300
51593409 nemars B March 20, 2019, 8:02 p.m. OK Mono C# TESTS 38 296 3584000 1300
60491400 ansergeyg B Sept. 13, 2019, 2:40 p.m. OK Mono C# TESTS 38 732 409600 1300
28030382 mban259 B June 25, 2017, 3:27 p.m. OK MS C# TESTS 38 46 9113600 1300
28034318 valergrad B June 25, 2017, 3:56 p.m. OK MS C# TESTS 38 46 9113600 1300
28072576 treasuryonly B June 27, 2017, 8:45 a.m. OK MS C# TESTS 38 46 9216000 1300
28059837 artsin666 B June 26, 2017, 2:43 p.m. OK MS C# TESTS 38 46 9216000 1300
28341141 Olga333 B July 7, 2017, 4:48 a.m. OK MS C# TESTS 38 46 9318400 1300
28724702 aandrei.pi B July 20, 2017, 12:27 p.m. OK MS C# TESTS 38 46 9318400 1300
28028518 renadeen B June 25, 2017, 3:15 p.m. OK MS C# TESTS 38 46 9523200 1300
28030625 Kirundel B June 25, 2017, 3:29 p.m. OK MS C# TESTS 38 46 11673600 1300
28029945 mircea85 B June 25, 2017, 3:24 p.m. OK MS C# TESTS 38 62 9113600 1300
28039478 antuan3000 B June 25, 2017, 4:44 p.m. OK MS C# TESTS 38 62 11571200 1300
29860328 Constantius B Aug. 29, 2017, 7:36 a.m. OK MS C++ TESTS 38 15 0 1300
31900416 AleksanderBalobanov B Oct. 30, 2017, 4:58 p.m. OK MS C++ TESTS 38 15 0 1300
41544858 vjudge4 B Aug. 13, 2018, 3:36 a.m. OK MS C++ TESTS 38 15 0 1300
30252846 vjudge5 B Sept. 10, 2017, 5:44 p.m. OK MS C++ TESTS 38 15 102400 1300
49810764 vjudge4 B Feb. 12, 2019, 12:33 a.m. OK MS C++ TESTS 38 15 102400 1300
30262551 vjudge2 B Sept. 11, 2017, 9:30 a.m. OK MS C++ TESTS 38 15 102400 1300
30259094 vjudge2 B Sept. 11, 2017, 5:08 a.m. OK MS C++ TESTS 38 15 102400 1300
30259016 vjudge4 B Sept. 11, 2017, 4:59 a.m. OK MS C++ TESTS 38 15 102400 1300
30123835 Egoist_ B Sept. 6, 2017, 6:08 a.m. OK MS C++ TESTS 38 15 204800 1300
29626186 A.Savko B Aug. 20, 2017, 5:03 p.m. OK MS C++ TESTS 38 15 204800 1300
57311724 116c B July 19, 2019, 6:44 a.m. OK MS C++ 2017 TESTS 38 31 0 1300
59066630 vjudge4 B Aug. 19, 2019, 2:13 a.m. OK MS C++ 2017 TESTS 38 31 0 1300
60734000 bolmiria B Sept. 17, 2019, 4:46 p.m. OK MS C++ 2017 TESTS 38 31 0 1300
60844993 YaMi506 B Sept. 19, 2019, 12:15 p.m. OK MS C++ 2017 TESTS 38 31 0 1300
62945997 vjudge3 B Oct. 19, 2019, 5:21 p.m. OK MS C++ 2017 TESTS 38 31 0 1300
58980298 vjudge2 B Aug. 18, 2019, 3:55 a.m. OK MS C++ 2017 TESTS 38 31 0 1300
58841792 vjudge4 B Aug. 15, 2019, 2:29 a.m. OK MS C++ 2017 TESTS 38 31 0 1300
59199274 vjudge4 B Aug. 21, 2019, 3:36 a.m. OK MS C++ 2017 TESTS 38 46 0 1300
62945999 vjudge4 B Oct. 19, 2019, 5:21 p.m. OK MS C++ 2017 TESTS 38 46 0 1300
28036707 anuj_shah B June 25, 2017, 4:17 p.m. OK PyPy 2 TESTS 38 77 22118400 1300
28030306 shreyans800755 B June 25, 2017, 3:26 p.m. OK PyPy 2 TESTS 38 77 22323200 1300
28026348 sragavan B June 25, 2017, 3 p.m. OK PyPy 2 TESTS 38 77 22528000 1300
28032727 saathvik782 B June 25, 2017, 3:44 p.m. OK PyPy 2 TESTS 38 78 22220800 1300
28037786 abhishekgahlot B June 25, 2017, 4:27 p.m. OK PyPy 2 TESTS 38 78 22323200 1300
28041183 attiw B June 25, 2017, 6:04 p.m. OK PyPy 2 TESTS 38 78 22528000 1300
28064637 thuglife69 B June 26, 2017, 8:47 p.m. OK PyPy 2 TESTS 38 93 22220800 1300
28027029 yaoye B June 25, 2017, 3:04 p.m. OK PyPy 2 TESTS 38 93 22220800 1300
28038147 akshay125 B June 25, 2017, 4:31 p.m. OK PyPy 2 TESTS 38 93 22630400 1300
44062724 soumyasarkar1998 B Oct. 10, 2018, 7:07 a.m. OK PyPy 2 TESTS 38 140 409600 1300
28069530 programmer_xyz B June 27, 2017, 6:19 a.m. OK PyPy 3 TESTS 38 108 23961600 1300
28028188 sas B June 25, 2017, 3:12 p.m. OK PyPy 3 TESTS 38 109 23756800 1300
28029742 Pulitzer B June 25, 2017, 3:23 p.m. OK PyPy 3 TESTS 38 109 23859200 1300
28041596 Vosatorp B June 25, 2017, 6:15 p.m. OK PyPy 3 TESTS 38 124 23449600 1300
31491506 samarth.koul.ece15 B Oct. 18, 2017, 7:08 p.m. OK PyPy 3 TESTS 38 124 23756800 1300
28056518 BenL B June 26, 2017, 11:39 a.m. OK PyPy 3 TESTS 38 124 23756800 1300
28102558 _AUR_ B June 27, 2017, 7:15 p.m. OK PyPy 3 TESTS 38 124 23859200 1300
28029672 Taxman B June 25, 2017, 3:22 p.m. OK PyPy 3 TESTS 38 124 24064000 1300
28180041 mattiasm83 B June 30, 2017, 8:34 p.m. OK PyPy 3 TESTS 38 124 24166400 1300
28027077 enitihas B June 25, 2017, 3:05 p.m. OK PyPy 3 TESTS 38 124 24371200 1300
28818854 brightlymale B July 24, 2017, 8:18 a.m. OK Python 2 TESTS 38 46 4710400 1300
28050439 BlueHazard_rony B June 26, 2017, 6:27 a.m. OK Python 2 TESTS 38 46 4710400 1300
28026608 WNG B June 25, 2017, 3:02 p.m. OK Python 2 TESTS 38 46 4710400 1300
28026124 KiPu B June 25, 2017, 2:59 p.m. OK Python 2 TESTS 38 46 4710400 1300
28068760 pythonpro B June 27, 2017, 5:20 a.m. OK Python 2 TESTS 38 46 4812800 1300
28033814 latsyrc1123 B June 25, 2017, 3:52 p.m. OK Python 2 TESTS 38 46 5120000 1300
28276154 weiy B July 4, 2017, 9:02 a.m. OK Python 2 TESTS 38 61 4710400 1300
28037651 send_n0des B June 25, 2017, 4:26 p.m. OK Python 2 TESTS 38 61 4710400 1300
28051041 nanumanu B June 26, 2017, 6:59 a.m. OK Python 2 TESTS 38 61 4812800 1300
31171732 biltharesatyendra B Oct. 9, 2017, 3:42 p.m. OK Python 2 TESTS 38 62 0 1300
28049815 Anjone B June 26, 2017, 5:51 a.m. OK Python 3 TESTS 38 61 5529600 1300
28036684 arpit040199 B June 25, 2017, 4:17 p.m. OK Python 3 TESTS 38 61 5529600 1300
28030695 L1va B June 25, 2017, 3:29 p.m. OK Python 3 TESTS 38 61 5529600 1300
31933550 attallah97 B Oct. 31, 2017, 8:46 p.m. OK Python 3 TESTS 38 62 0 1300
30994437 pipialvin B Oct. 4, 2017, 2:25 p.m. OK Python 3 TESTS 38 62 0 1300
29302376 penghao817 bowenhan B Aug. 9, 2017, 9:21 a.m. OK Python 3 TESTS 38 62 4608000 1300
28795506 wangzpeng B July 23, 2017, 8:09 a.m. OK Python 3 TESTS 38 62 4608000 1300
28548992 Cramble B July 14, 2017, 1:04 p.m. OK Python 3 TESTS 38 62 5529600 1300
28341401 treasuryonly B July 7, 2017, 5:09 a.m. OK Python 3 TESTS 38 62 5529600 1300
28244108 Vasiliy_48 B July 3, 2017, 4:59 a.m. OK Python 3 TESTS 38 62 5529600 1300
28216085 walseb B July 2, 2017, 4:12 p.m. OK Ruby TESTS 38 93 6451200 1300
28026893 Tirr B June 25, 2017, 3:03 p.m. OK Rust TESTS 38 15 1536000 1300
29292961 Hillmouse B Aug. 8, 2017, 7:54 p.m. OK Rust TESTS 38 187 1536000 1300
28035120 mysterion B June 25, 2017, 4:03 p.m. OK Scala TESTS 38 218 23040000 1300
28030104 pinguinson B June 25, 2017, 3:25 p.m. OK Scala TESTS 38 327 24576000 1300

remove filters

Back to search problems