Codeforces Round 421 (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
820 Codeforces Round 421 (Div. 2) FINISHED False 7200 238951523 June 27, 2017, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5299 ) B Mister B and Angle in Polygon PROGRAMMING constructive algorithms geometry math 1300

B'On one quiet day all of sudden Mister B decided to draw angle a on his field. Aliens have already visited his field and left many different geometric figures on it. One of the figures is regular convex n-gon (regular convex polygon with n sides). That 's why Mister B decided to use this polygon. Now Mister B must find three distinct vertices v1, v2, v3 such that the angle (where v2 is the vertex of the angle, and v1 and v3 lie on its sides) is as close as possible to a. In other words, the value should be minimum possible. If there are many optimal solutions, Mister B should be satisfied with any of them. First and only line contains two space-separated integers n and a (3 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89180) -- the number of vertices in the polygon and the needed angle, in degrees. Print three space-separated integers: the vertices v1, v2, v3, which form . If there are multiple optimal solutions, print any of them. The vertices are numbered from 1 to n in clockwise order. In first sample test vertices of regular triangle can create only angle of 60 degrees, that 's why every possible angle is correct. Vertices of square can create 45 or 90 degrees angles only. That 's why in second sample test the angle of 45 degrees was chosen, since |45 xe2 x80 x89- xe2 x80 x8967| xe2 x80 x89< xe2 x80 x89|90 xe2 x80 x89- xe2 x80 x8967|. Other correct answers are: "3 1 2", "3 2 4", "4 2 3", "4 3 1", "1 3 4", "1 4 2", "2 4 1", "4 1 3", "3 1 4", "3 4 2", "2 4 3", "2 3 1", "1 3 2", "1 2 4", "4 2 1". In third sample test, on the contrary, the angle of 90 degrees was chosen, since |90 xe2 x80 x89- xe2 x80 x8968| xe2 x80 x89< xe2 x80 x89|45 xe2 x80 x89- xe2 x80 x8968|. Other correct answers are: "2 1 4", "3 2 1", "1 2 3", "4 3 2", "2 3 4", "1 4 3", "3 4 1". '...

Tutorials

Codeforces Round #421 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
28084890 nanae1914 B June 27, 2017, 3:06 p.m. OK D TESTS 46 15 2969600 1300
28091148 Glushen B June 27, 2017, 3:44 p.m. OK D TESTS 46 15 2969600 1300
28091836 ruban B June 27, 2017, 3:49 p.m. OK Delphi TESTS 46 15 4505600 1300
28121634 NULL B June 28, 2017, 1:46 p.m. OK FPC TESTS 46 15 1638400 1300
28394152 Slonik B July 9, 2017, 8:53 p.m. OK FPC TESTS 46 15 1638400 1300
28868247 The_Best_Fizz_2001 B July 25, 2017, 7:09 a.m. OK FPC TESTS 46 15 1638400 1300
28868274 The_Best_Fizz_2001 B July 25, 2017, 7:10 a.m. OK FPC TESTS 46 15 1638400 1300
28097372 Jarazorg B June 27, 2017, 4:29 p.m. OK FPC TESTS 46 15 1638400 1300
28096964 Minh_love_Hong_Phuc B June 27, 2017, 4:27 p.m. OK FPC TESTS 46 15 1638400 1300
28096367 The_Best_Fizz_2001 B June 27, 2017, 4:23 p.m. OK FPC TESTS 46 15 1638400 1300
28099406 Grom9941 B June 27, 2017, 5:17 p.m. OK FPC TESTS 46 15 1638400 1300
28106473 AnotherLL B June 28, 2017, 2:24 a.m. OK FPC TESTS 46 15 1638400 1300
28121614 eliotanderson B June 28, 2017, 1:44 p.m. OK FPC TESTS 46 15 1638400 1300
34539552 swargo98 B Jan. 25, 2018, 7:58 a.m. OK GNU C TESTS 46 15 1843200 1300
32611600 reyad B Nov. 24, 2017, 6 a.m. OK GNU C TESTS 46 15 1843200 1300
28326202 Swordelf B July 6, 2017, 12:06 p.m. OK GNU C TESTS 46 15 1945600 1300
28365540 narang9958875313 B July 8, 2017, 9:25 a.m. OK GNU C TESTS 46 15 1945600 1300
28212220 q843705423 B July 2, 2017, 2:29 p.m. OK GNU C TESTS 46 15 1945600 1300
28104742 fishybestgirl B June 27, 2017, 10:33 p.m. OK GNU C TESTS 46 15 1945600 1300
28101204 mananb31 B June 27, 2017, 6:08 p.m. OK GNU C TESTS 46 15 1945600 1300
28100731 Ruhan B June 27, 2017, 5:50 p.m. OK GNU C TESTS 46 15 1945600 1300
28100105 sid9406 B June 27, 2017, 5:33 p.m. OK GNU C TESTS 46 15 1945600 1300
28096907 l_modric B June 27, 2017, 4:27 p.m. OK GNU C TESTS 46 15 1945600 1300
32118709 Eopxt B Nov. 7, 2017, 12:19 p.m. OK GNU C++ TESTS 46 15 0 1300
32054337 vjudge4 B Nov. 4, 2017, 1:21 p.m. OK GNU C++ TESTS 46 15 0 1300
32348229 vjudge1 B Nov. 16, 2017, 6:14 a.m. OK GNU C++ TESTS 46 15 0 1300
32001316 vjudge4 B Nov. 3, 2017, 8:14 a.m. OK GNU C++ TESTS 46 15 0 1300
31241178 Smallmarks B Oct. 12, 2017, 12:51 p.m. OK GNU C++ TESTS 46 15 0 1300
31239295 vjudge5 B Oct. 12, 2017, 11:29 a.m. OK GNU C++ TESTS 46 15 0 1300
31239155 vjudge5 B Oct. 12, 2017, 11:22 a.m. OK GNU C++ TESTS 46 15 0 1300
31238892 vjudge4 B Oct. 12, 2017, 11:13 a.m. OK GNU C++ TESTS 46 15 0 1300
31238253 vjudge3 B Oct. 12, 2017, 10:44 a.m. OK GNU C++ TESTS 46 15 0 1300
31238212 vjudge2 B Oct. 12, 2017, 10:43 a.m. OK GNU C++ TESTS 46 15 0 1300
28089250 fsociety00 B June 27, 2017, 3:31 p.m. OK GNU C11 TESTS 46 15 1945600 1300
34321623 CoderTan B Jan. 19, 2018, 3:52 p.m. OK GNU C11 TESTS 46 15 1945600 1300
28938269 orderedchaos B July 27, 2017, 9:15 p.m. OK GNU C11 TESTS 46 15 1945600 1300
28097204 Jeel_Vaishnav B June 27, 2017, 4:28 p.m. OK GNU C11 TESTS 46 15 1945600 1300
28086806 loik137 B June 27, 2017, 3:16 p.m. OK GNU C11 TESTS 46 15 1945600 1300
34258708 vjudge4 B Jan. 17, 2018, 5:46 p.m. OK GNU C11 TESTS 46 15 2662400 1300
28123402 FromSaffronCity B June 28, 2017, 3:54 p.m. OK GNU C11 TESTS 46 15 2662400 1300
68774082 hslove B Jan. 14, 2020, 12:52 p.m. OK GNU C11 TESTS 46 31 0 1300
60904265 kaiboy B Sept. 20, 2019, 1:10 a.m. OK GNU C11 TESTS 46 31 0 1300
68777293 liuweida B Jan. 14, 2020, 1:51 p.m. OK GNU C11 TESTS 46 31 0 1300
31162734 vjudge1 B Oct. 9, 2017, 8:47 a.m. OK GNU C++11 TESTS 46 15 0 1300
39142635 arobindo B June 11, 2018, 10:09 a.m. OK GNU C++11 TESTS 46 15 0 1300
32352771 yhha B Nov. 16, 2017, 10:54 a.m. OK GNU C++11 TESTS 46 15 0 1300
32138042 plain B Nov. 8, 2017, 11:43 a.m. OK GNU C++11 TESTS 46 15 0 1300
32119452 NewIdea B Nov. 7, 2017, 12:46 p.m. OK GNU C++11 TESTS 46 15 0 1300
32119198 crazyX_CN B Nov. 7, 2017, 12:38 p.m. OK GNU C++11 TESTS 46 15 0 1300
31982017 __B B Nov. 2, 2017, 1:47 p.m. OK GNU C++11 TESTS 46 15 0 1300
31301219 ljaneczk B Oct. 14, 2017, 10:24 a.m. OK GNU C++11 TESTS 46 15 0 1300
30906792 _glammerACMer B Oct. 1, 2017, 11:16 a.m. OK GNU C++11 TESTS 46 15 0 1300
30827441 pipialvin B Sept. 29, 2017, 12:05 p.m. OK GNU C++11 TESTS 46 15 0 1300
31924954 Gudleyd B Oct. 31, 2017, 2:51 p.m. OK GNU C++14 TESTS 46 15 0 1300
31853505 mark65751 B Oct. 29, 2017, 1:21 a.m. OK GNU C++14 TESTS 46 15 0 1300
69724123 ratul_supertramp B Jan. 29, 2020, 11:41 a.m. OK GNU C++14 TESTS 46 15 0 1300
55981609 ysav B June 23, 2019, 9:39 p.m. OK GNU C++14 TESTS 46 15 0 1300
50703545 Hyperbolic_ArcTangent B March 3, 2019, 1:17 a.m. OK GNU C++14 TESTS 46 15 0 1300
39237979 Newton01 B June 14, 2018, 9:23 a.m. OK GNU C++14 TESTS 46 15 0 1300
32495058 illusionist96 B Nov. 20, 2017, 9:48 a.m. OK GNU C++14 TESTS 46 15 0 1300
32356892 Sonechko B Nov. 16, 2017, 1:52 p.m. OK GNU C++14 TESTS 46 15 0 1300
32150304 Slsvcn B Nov. 9, 2017, 3:18 a.m. OK GNU C++14 TESTS 46 15 0 1300
32128664 Matin.Asp B Nov. 7, 2017, 6:59 p.m. OK GNU C++14 TESTS 46 15 0 1300
55718743 Farrell12138 B June 18, 2019, 2:06 p.m. OK GNU C++17 TESTS 46 15 0 1300
55693758 elizkaveta B June 17, 2019, 7:52 p.m. OK GNU C++17 TESTS 46 15 0 1300
35724715 vjudge5 B Feb. 26, 2018, 8:26 a.m. OK GNU C++17 TESTS 46 15 2048000 1300
54084891 swarnaditya_maitra B May 14, 2019, 6:43 a.m. OK GNU C++17 TESTS 46 30 0 1300
55201981 chongryong B June 6, 2019, 10:59 a.m. OK GNU C++17 TESTS 46 30 0 1300
55561065 eduardonunes2525 B June 14, 2019, 12:41 p.m. OK GNU C++17 TESTS 46 30 0 1300
55984966 detele B June 24, 2019, 2:24 a.m. OK GNU C++17 TESTS 46 30 0 1300
57127378 vjudge2 B July 16, 2019, 5:24 a.m. OK GNU C++17 TESTS 46 30 0 1300
57127582 vjudge4 B July 16, 2019, 5:31 a.m. OK GNU C++17 TESTS 46 30 0 1300
58864981 cang_qiong B Aug. 15, 2019, 1:01 p.m. OK GNU C++17 TESTS 46 30 0 1300
33229176 CowboyFromHell B Dec. 14, 2017, 3:59 a.m. OK GNU C++17 Diagnostics TESTS 46 811 98508800 1300
28101749 Leonardone B June 27, 2017, 6:33 p.m. OK Go TESTS 46 31 22937600 1300
28099788 yuki2006 B June 27, 2017, 5:25 p.m. OK Go TESTS 46 31 23040000 1300
28123391 sl0th B June 28, 2017, 3:53 p.m. OK Haskell TESTS 46 15 44851200 1300
28101827 ak464tnok B June 27, 2017, 6:37 p.m. OK Haskell TESTS 46 30 44851200 1300
28726641 nadavishe B July 20, 2017, 1:43 p.m. OK Haskell TESTS 46 31 53350400 1300
28086772 kadoban B June 27, 2017, 3:16 p.m. OK Haskell TESTS 46 93 61849600 1300
28109258 Psp_98 B June 28, 2017, 6:27 a.m. OK Java 8 TESTS 46 108 20172800 1300
53895608 mikit B May 9, 2019, 5:38 a.m. OK Java 8 TESTS 46 109 0 1300
68356278 YazanAssaf B Jan. 7, 2020, 12:13 p.m. OK Java 8 TESTS 46 109 0 1300
28208707 yashk B July 2, 2017, 11 a.m. OK Java 8 TESTS 46 109 20172800 1300
28172336 Adit_Shah B June 30, 2017, 1 p.m. OK Java 8 TESTS 46 109 20172800 1300
28109143 Psp_98 B June 28, 2017, 6:20 a.m. OK Java 8 TESTS 46 109 20172800 1300
28093312 AnshulG B June 27, 2017, 4:01 p.m. OK Java 8 TESTS 46 109 20172800 1300
28092118 Sanjay_14BIT009 B June 27, 2017, 3:51 p.m. OK Java 8 TESTS 46 109 20172800 1300
28084256 2020akadaver B June 27, 2017, 3:03 p.m. OK Java 8 TESTS 46 109 20172800 1300
28084206 I_love_sqrtdecompton B June 27, 2017, 3:03 p.m. OK Java 8 TESTS 46 109 20172800 1300
28094408 serejkee B June 27, 2017, 4:09 p.m. OK Kotlin TESTS 46 109 20582400 1300
43574061 tumoyakov B Sept. 29, 2018, 2:07 p.m. OK Kotlin TESTS 46 155 0 1300
28086573 dened B June 27, 2017, 3:15 p.m. OK Kotlin TESTS 46 1871 20787200 1300
55658369 m1_k3 B June 16, 2019, 6:52 p.m. OK Mono C# TESTS 46 46 0 1300
53942329 treasuryonly B May 10, 2019, 4:07 a.m. OK Mono C# TESTS 46 46 0 1300
28083101 kuuso B June 27, 2017, 2:57 p.m. OK Mono C# TESTS 46 46 9216000 1300
52075239 nemars B March 31, 2019, 9:40 a.m. OK Mono C# TESTS 46 61 0 1300
28101313 semera B June 27, 2017, 6:13 p.m. OK Mono C# TESTS 46 62 10752000 1300
28108090 og.kostya B June 28, 2017, 5:09 a.m. OK MS C# TESTS 46 46 9216000 1300
28108064 og.kostya B June 28, 2017, 5:07 a.m. OK MS C# TESTS 46 46 9216000 1300
28688784 aandrei.pi B July 19, 2017, 7:44 a.m. OK MS C# TESTS 46 46 9318400 1300
28195365 DanilaMaestro B July 1, 2017, 4:44 p.m. OK MS C# TESTS 46 46 9318400 1300
28206796 Olga333 B July 2, 2017, 8:52 a.m. OK MS C# TESTS 46 46 9523200 1300
28092244 fr0st B June 27, 2017, 3:53 p.m. OK MS C# TESTS 46 62 11673600 1300
28115453 ShowStopper728 B June 28, 2017, 12:25 p.m. OK MS C# TESTS 46 62 15872000 1300
28110424 artsin666 B June 28, 2017, 7:38 a.m. OK MS C# TESTS 46 77 9318400 1300
28086104 AlexanderL B June 27, 2017, 3:12 p.m. OK MS C# TESTS 46 93 11161600 1300
29624571 Friska B Aug. 20, 2017, 3:32 p.m. OK MS C++ TESTS 46 15 102400 1300
30196562 Egoist_ B Sept. 8, 2017, 6:57 a.m. OK MS C++ TESTS 46 15 204800 1300
29214920 SakoXF B Aug. 5, 2017, 9:27 a.m. OK MS C++ TESTS 46 15 1945600 1300
28083620 xcdxcdxcd B June 27, 2017, 3 p.m. OK MS C++ TESTS 46 15 1945600 1300
28100373 tenletters B June 27, 2017, 5:40 p.m. OK MS C++ TESTS 46 15 1945600 1300
28107691 1627405131_ws B June 28, 2017, 4:30 a.m. OK MS C++ TESTS 46 15 1945600 1300
33981340 vjudge3 B Jan. 7, 2018, 11:05 a.m. OK MS C++ TESTS 46 15 2048000 1300
33981291 ys1468362286 B Jan. 7, 2018, 11:02 a.m. OK MS C++ TESTS 46 15 2048000 1300
29142559 yanshaoxing B Aug. 3, 2017, 1:30 a.m. OK MS C++ TESTS 46 15 2048000 1300
34501648 DMatthew B Jan. 24, 2018, 2:40 a.m. OK MS C++ TESTS 46 15 2048000 1300
58842710 vjudge5 B Aug. 15, 2019, 3:01 a.m. OK MS C++ 2017 TESTS 46 31 0 1300
28311978 Darooha B July 5, 2017, 8:49 p.m. OK Ocaml TESTS 46 15 3891200 1300
28090440 rsFalse B June 27, 2017, 3:39 p.m. OK Perl TESTS 46 31 2355200 1300
28084531 sragavan B June 27, 2017, 3:04 p.m. OK PyPy 2 TESTS 46 62 21913600 1300
28289247 inscaven B July 4, 2017, 8:40 p.m. OK PyPy 2 TESTS 46 77 21913600 1300
28091516 thuglife69 B June 27, 2017, 3:47 p.m. OK PyPy 2 TESTS 46 77 22016000 1300
28086737 dragon.warrior B June 27, 2017, 3:16 p.m. OK PyPy 2 TESTS 46 78 21913600 1300
40048786 aeternalis1 B July 7, 2018, 2:24 a.m. OK PyPy 2 TESTS 46 124 307200 1300
28090118 yaoye B June 27, 2017, 3:37 p.m. OK PyPy 2 TESTS 46 592 22937600 1300
28110353 Punter B June 28, 2017, 7:34 a.m. OK PyPy 3 TESTS 46 93 23142400 1300
28083833 yhn112 B June 27, 2017, 3:01 p.m. OK PyPy 3 TESTS 46 108 23347200 1300
28345765 _AUR_ B July 7, 2017, 8:55 a.m. OK PyPy 3 TESTS 46 109 23244800 1300
28102636 Blencer B June 27, 2017, 7:21 p.m. OK PyPy 3 TESTS 46 109 23244800 1300
28101327 Vosatorp B June 27, 2017, 6:13 p.m. OK PyPy 3 TESTS 46 109 23244800 1300
28084828 Taxman B June 27, 2017, 3:06 p.m. OK PyPy 3 TESTS 46 109 23244800 1300
28105515 programmer_xyz B June 28, 2017, 12:15 a.m. OK PyPy 3 TESTS 46 124 23244800 1300
28099366 JustAni B June 27, 2017, 5:17 p.m. OK PyPy 3 TESTS 46 124 23347200 1300
28085245 Ferume B June 27, 2017, 3:08 p.m. OK PyPy 3 TESTS 46 124 23654400 1300
28082680 Naoki_M B June 27, 2017, 2:55 p.m. OK PyPy 3 TESTS 46 124 23654400 1300
28095871 2390_ B June 27, 2017, 4:20 p.m. OK Python 2 TESTS 46 46 4710400 1300
28092971 congminh91 B June 27, 2017, 3:58 p.m. OK Python 2 TESTS 46 46 4710400 1300
28089887 akshesh B June 27, 2017, 3:35 p.m. OK Python 2 TESTS 46 46 4710400 1300
28082330 markin2000 B June 27, 2017, 2:54 p.m. OK Python 2 TESTS 46 46 4710400 1300
28370670 gautam14040 B July 8, 2017, 1:55 p.m. OK Python 2 TESTS 46 62 4710400 1300
28129566 nealzane B June 29, 2017, 2:03 a.m. OK Python 2 TESTS 46 62 4710400 1300
28101387 codelegend B June 27, 2017, 6:16 p.m. OK Python 2 TESTS 46 62 4710400 1300
28082116 runnie B June 27, 2017, 2:53 p.m. OK Python 2 TESTS 46 62 4710400 1300
28084077 zensh B June 27, 2017, 3:02 p.m. OK Python 2 TESTS 46 92 6348800 1300
28580811 raviojha2105 B July 15, 2017, 7:13 p.m. OK Python 2 TESTS 46 93 4710400 1300
28087317 acherk B June 27, 2017, 3:19 p.m. OK Python 3 TESTS 46 46 5529600 1300
30244468 luke0201 B Sept. 10, 2017, noon OK Python 3 TESTS 46 62 0 1300
28831631 luongquocan B July 24, 2017, 2:46 p.m. OK Python 3 TESTS 46 62 4608000 1300
33510826 Yash_ B Dec. 22, 2017, 2:34 p.m. OK Python 3 TESTS 46 62 5529600 1300
28173538 njupt_lyy B June 30, 2017, 1:45 p.m. OK Python 3 TESTS 46 62 5529600 1300
28134019 wika B June 29, 2017, 7:35 a.m. OK Python 3 TESTS 46 62 5529600 1300
28110494 Sina_Imani B June 28, 2017, 7:42 a.m. OK Python 3 TESTS 46 62 5529600 1300
28100677 eugalt B June 27, 2017, 5:49 p.m. OK Python 3 TESTS 46 62 5529600 1300
28100402 eugalt B June 27, 2017, 5:41 p.m. OK Python 3 TESTS 46 62 5529600 1300
28092421 YeSatellite B June 27, 2017, 3:54 p.m. OK Python 3 TESTS 46 62 5529600 1300
29963620 briansu B Sept. 1, 2017, 3:44 a.m. OK Ruby TESTS 46 93 0 1300
34254623 vjudge5 B Jan. 17, 2018, 2:40 p.m. OK Ruby TESTS 46 93 6451200 1300
28082838 hogeover30 B June 27, 2017, 2:56 p.m. OK Ruby TESTS 46 93 6451200 1300
28085113 mysterion B June 27, 2017, 3:07 p.m. OK Scala TESTS 46 233 23142400 1300
28653594 Yucchiiro B July 18, 2017, 3:17 a.m. OK Scala TESTS 46 295 23654400 1300
28653405 Yucchiiro B July 18, 2017, 3:06 a.m. OK Scala TESTS 46 296 23552000 1300
28653471 Yucchiiro B July 18, 2017, 3:09 a.m. OK Scala TESTS 46 311 23654400 1300
28653140 Yucchiiro B July 18, 2017, 2:50 a.m. OK Scala TESTS 46 327 23859200 1300
28090153 wrick B June 27, 2017, 3:37 p.m. OK Scala TESTS 46 1606 77414400 1300

remove filters

Back to search problems