Codeforces Round 346 (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
659 Codeforces Round 346 (Div. 2) FINISHED False 9000 317051723 March 30, 2016, 4:05 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 6690 ) D Bicycle Race PROGRAMMING geometry implementation math 1500

Maria participates in a bicycle race. The speedway takes place on the shores of Lake Lucerne, just repeating its contour. As you know, the lake shore consists only of straight sections, directed to the north, south, east or west. Let's introduce a system of coordinates, directing the Ox axis from west to east, and the Oy axis from south to north. As a starting position of the race the southernmost point of the track is selected (and if there are several such points, the most western among them). The participants start the race, moving to the north. At all straight sections of the track, the participants travel in one of the four directions (north, south, east or west) and change the direction of movement only in bends between the straight sections. The participants, of course, never turn back, that is, they do not change the direction of movement from north to south or from east to west (or vice versa). Maria is still young, so she does not feel confident at some turns. Namely, Maria feels insecure if at a failed or untimely turn, she gets into the water. In other words, Maria considers the turn dangerous if she immediately gets into the water if it is ignored. Help Maria get ready for the competition — determine the number of dangerous turns on the track. The first line of the input contains an integer n ( 4 ≤ n ≤ 1000 ) — the number of straight sections of the track. The following ( n + 1) -th line contains pairs of integers ( x i , y i ) ( - 10 000 ≤ x i , y i ≤ 10 000 ). The first of these points is the starting position. The i -th straight section of the track begins at the point ( x i , y i ) and ends at the point ( x i + 1 , y i + 1 ) . It is guaranteed that: the first straight section is directed to the north; the southernmost (and if there are several, then the most western of among them) point of the track is the first point; the last point coincides with the first one (i.e., the start position); any pair of straight sections of the track has no

Tutorials

Editorial for Codeforces Round #346 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
39339301 LODB---D D June 17, 2018, 3:49 p.m. OK Clang++17 Diagnostics TESTS 22 31 0 1500
17339359 favstovol D April 16, 2016, 11:38 a.m. OK Delphi TESTS 22 15 0 1500
27329783 The_Winners D May 25, 2017, 5:32 a.m. OK FPC TESTS 22 15 0 1500
19906562 Gray_58 D Aug. 16, 2016, 12:05 p.m. OK FPC TESTS 22 15 1638400 1500
34984569 Little_Jian D Feb. 6, 2018, 11:37 p.m. OK FPC TESTS 22 15 1638400 1500
35042123 luogu_bot3 D Feb. 8, 2018, 3:09 a.m. OK FPC TESTS 22 15 1638400 1500
17536046 magetron D April 27, 2016, 1:29 p.m. OK FPC TESTS 22 15 1740800 1500
26538034 hocattuongltv D April 21, 2017, 1:05 p.m. OK FPC TESTS 22 15 1740800 1500
27927204 KagamiharaNadeshiko D June 20, 2017, 2:38 p.m. OK FPC TESTS 22 15 1740800 1500
28690593 ice_tea D July 19, 2017, 8:37 a.m. OK FPC TESTS 22 15 4812800 1500
20087720 vkozlovs D Aug. 23, 2016, 2:28 p.m. OK FPC TESTS 22 30 2355200 1500
44189090 luogu_bot5 D Oct. 12, 2018, 2:17 p.m. OK FPC TESTS 22 31 0 1500
31274222 thilio D Oct. 13, 2017, 12:32 p.m. OK GNU C TESTS 22 15 0 1500
27253072 JoeBlow D May 20, 2017, 9:01 p.m. OK GNU C TESTS 22 15 0 1500
22720651 maratonando2 D Dec. 5, 2016, 11:05 p.m. OK GNU C TESTS 22 15 0 1500
20263007 maratonando2 D Aug. 29, 2016, 7:22 p.m. OK GNU C TESTS 22 15 0 1500
19616748 yigezhe D Aug. 4, 2016, 2:09 p.m. OK GNU C TESTS 22 15 0 1500
19190497 SditeMok D July 17, 2016, 1:06 p.m. OK GNU C TESTS 22 15 0 1500
32665366 antoniopf D Nov. 26, 2017, 7:55 a.m. OK GNU C TESTS 22 15 1843200 1500
36250056 luogu_bot3 D March 13, 2018, 1:21 p.m. OK GNU C TESTS 22 15 1843200 1500
33744308 andressafm D Dec. 28, 2017, 7:13 p.m. OK GNU C TESTS 22 15 1843200 1500
32937936 RHDragon D Dec. 5, 2017, 1:05 a.m. OK GNU C TESTS 22 15 1843200 1500
41917822 wzlwzl D Aug. 21, 2018, 12:49 a.m. OK GNU C++ TESTS 22 15 0 1500
40652502 vjudge2 D July 23, 2018, 12:43 a.m. OK GNU C++ TESTS 22 15 0 1500
32557024 maratonando2 D Nov. 22, 2017, 4:44 p.m. OK GNU C++ TESTS 22 15 0 1500
32204413 maratonando3 D Nov. 10, 2017, 7:27 p.m. OK GNU C++ TESTS 22 15 0 1500
32204386 maratonando2 D Nov. 10, 2017, 7:26 p.m. OK GNU C++ TESTS 22 15 0 1500
42064420 LucasAnjos D Aug. 24, 2018, 6:44 p.m. OK GNU C++ TESTS 22 15 0 1500
30819574 Biscuit0913 D Sept. 29, 2017, 3:31 a.m. OK GNU C++ TESTS 22 15 0 1500
30285871 assdollakhan D Sept. 12, 2017, 12:20 p.m. OK GNU C++ TESTS 22 15 0 1500
30262732 i_am_eating_wa_and_tle D Sept. 11, 2017, 9:38 a.m. OK GNU C++ TESTS 22 15 0 1500
29596577 Septher D Aug. 19, 2017, 11:19 a.m. OK GNU C++ TESTS 22 15 0 1500
51778438 mateusaraxa2000 D March 24, 2019, 1:48 a.m. OK GNU C11 TESTS 22 15 0 1500
28648531 Jokers_Grin D July 17, 2017, 8:27 p.m. OK GNU C11 TESTS 22 15 1945600 1500
28649267 vjudge2 D July 17, 2017, 9:23 p.m. OK GNU C11 TESTS 22 15 1945600 1500
17532729 Wenice D April 27, 2016, 8:57 a.m. OK GNU C11 TESTS 22 15 2048000 1500
56637413 victorhugo.daniel123 D July 6, 2019, 8:49 p.m. OK GNU C11 TESTS 22 31 0 1500
50502493 vjudge1 D Feb. 25, 2019, 5:55 p.m. OK GNU C11 TESTS 22 31 0 1500
69270308 kaiboy D Jan. 21, 2020, 8:37 p.m. OK GNU C11 TESTS 22 31 0 1500
69269385 kaiboy D Jan. 21, 2020, 8:06 p.m. OK GNU C11 TESTS 22 31 0 1500
59960712 guel D Sept. 3, 2019, 5:56 p.m. OK GNU C11 TESTS 22 31 0 1500
56858308 rainboy D July 11, 2019, 7:55 p.m. OK GNU C11 TESTS 22 31 0 1500
41746632 vjudge5 D Aug. 18, 2018, 7:50 a.m. OK GNU C++11 TESTS 22 15 0 1500
59646712 vjudge3 D Aug. 29, 2019, 6:12 a.m. OK GNU C++11 TESTS 22 15 0 1500
57258304 dado612 D July 18, 2019, 3:32 a.m. OK GNU C++11 TESTS 22 15 0 1500
57089058 WangTianYi D July 15, 2019, 10:01 a.m. OK GNU C++11 TESTS 22 15 0 1500
55818516 vjudge4 D June 20, 2019, 7:29 a.m. OK GNU C++11 TESTS 22 15 0 1500
55818452 vjudge3 D June 20, 2019, 7:27 a.m. OK GNU C++11 TESTS 22 15 0 1500
55181912 SoiMae D June 5, 2019, 11:33 p.m. OK GNU C++11 TESTS 22 15 0 1500
51482361 freenm D March 19, 2019, 12:08 p.m. OK GNU C++11 TESTS 22 15 0 1500
44185386 luogu_bot2 D Oct. 12, 2018, 12:58 p.m. OK GNU C++11 TESTS 22 15 0 1500
42199836 vjudge3 D Aug. 28, 2018, 8:15 a.m. OK GNU C++11 TESTS 22 15 0 1500
67666148 shubham_364 D Dec. 26, 2019, 5:57 p.m. OK GNU C++14 TESTS 22 15 0 1500
64597751 fepaf D Nov. 9, 2019, 5:26 p.m. OK GNU C++14 TESTS 22 15 0 1500
54960661 1813004846 D June 2, 2019, 3:31 a.m. OK GNU C++14 TESTS 22 15 0 1500
55278256 Genezio D June 7, 2019, 8:54 p.m. OK GNU C++14 TESTS 22 15 0 1500
55920646 vjudge1 D June 22, 2019, 7:19 a.m. OK GNU C++14 TESTS 22 15 0 1500
56137821 vjudge3 D June 27, 2019, 12:19 a.m. OK GNU C++14 TESTS 22 15 0 1500
56674634 Marcos-S D July 7, 2019, 2:50 p.m. OK GNU C++14 TESTS 22 15 0 1500
58512982 stefdasca D Aug. 9, 2019, 8:15 p.m. OK GNU C++14 TESTS 22 15 0 1500
58838962 the_compiler D Aug. 15, 2019, 12:16 a.m. OK GNU C++14 TESTS 22 15 0 1500
58875255 NativeCode D Aug. 15, 2019, 5:29 p.m. OK GNU C++14 TESTS 22 15 0 1500
67670133 abdulrahman_aj D Dec. 26, 2019, 7:53 p.m. OK GNU C++17 TESTS 22 15 0 1500
64327565 Priyam2k D Nov. 5, 2019, 5:56 p.m. OK GNU C++17 TESTS 22 15 0 1500
60307774 UESTC_Forsaken D Sept. 9, 2019, 2:34 p.m. OK GNU C++17 TESTS 22 15 0 1500
59648561 more-981630 D Aug. 29, 2019, 7:07 a.m. OK GNU C++17 TESTS 22 15 0 1500
59240020 may_21 D Aug. 21, 2019, 7:12 p.m. OK GNU C++17 TESTS 22 15 0 1500
58874331 rohamizadidoost D Aug. 15, 2019, 4:59 p.m. OK GNU C++17 TESTS 22 15 0 1500
57914719 kobortor D July 29, 2019, 12:08 a.m. OK GNU C++17 TESTS 22 15 0 1500
57130949 vjudge4 D July 16, 2019, 7:07 a.m. OK GNU C++17 TESTS 22 15 0 1500
56374132 _Samir D July 1, 2019, 5:42 a.m. OK GNU C++17 TESTS 22 15 0 1500
55222636 MatheusPaulo D June 6, 2019, 8:54 p.m. OK GNU C++17 TESTS 22 15 0 1500
36128637 lucasns D March 9, 2018, 7:41 p.m. OK GNU C++17 Diagnostics TESTS 22 904 97484800 1500
36335225 crabvoid D March 16, 2018, 7:22 p.m. OK GNU C++17 Diagnostics TESTS 22 920 97792000 1500
22297619 togatoga D Nov. 17, 2016, 10:55 p.m. OK Go TESTS 22 15 204800 1500
19949290 pavel.rosputko D Aug. 18, 2016, 4:07 p.m. OK Haskell TESTS 22 15 53248000 1500
67648850 CodAR D Dec. 26, 2019, 11:18 a.m. OK Java 11 TESTS 22 217 0 1500
17313070 inverse D April 14, 2016, 10:57 a.m. OK Java 7 TESTS 22 108 0 1500
17501054 LocknKey D April 25, 2016, 1:21 a.m. OK Java 7 TESTS 22 109 39014400 1500
17528347 tihcar D April 26, 2016, 9:15 p.m. OK Java 7 TESTS 22 109 39219200 1500
17473313 mIchanic D April 23, 2016, 7:06 p.m. OK Java 7 TESTS 22 109 39219200 1500
17397185 buzaubakov.raman D April 20, 2016, 9:48 a.m. OK Java 7 TESTS 22 124 39116800 1500
19410296 xiaowuc1 D July 25, 2016, 8:51 p.m. OK Java 7 TESTS 22 139 0 1500
18633939 sfmunera D June 21, 2016, 5:13 p.m. OK Java 7 TESTS 22 139 0 1500
60736022 pikapika00 saptarshim Vaibhav1111 D Sept. 17, 2019, 5:32 p.m. OK Java 8 TESTS 22 109 0 1500
39748580 Ziax D June 28, 2018, 4:35 p.m. OK Java 8 TESTS 22 109 0 1500
27448093 BEerYourself D May 30, 2017, 12:28 p.m. OK Java 8 TESTS 22 109 0 1500
58930597 MohamedK D Aug. 16, 2019, 11:59 p.m. OK Java 8 TESTS 22 109 0 1500
56371385 derrick20 D July 1, 2019, 3:52 a.m. OK Java 8 TESTS 22 109 0 1500
58873381 MohamedK D Aug. 15, 2019, 4:31 p.m. OK Java 8 TESTS 22 109 0 1500
46194514 ypa D Nov. 25, 2018, 7:32 a.m. OK Java 8 TESTS 22 109 0 1500
44257739 rajatjain D Oct. 13, 2018, 1:03 p.m. OK Java 8 TESTS 22 109 0 1500
17381341 YakutovDmitriy D April 18, 2016, 9 p.m. OK Java 8 TESTS 22 109 20480000 1500
31557525 aditya124578 D Oct. 21, 2017, 8:30 a.m. OK Java 8 TESTS 22 109 20582400 1500
36351316 psoliev D March 17, 2018, 10:46 a.m. OK Mono C# TESTS 22 31 8089600 1500
41248653 Mickey-snow D Aug. 5, 2018, 2:40 p.m. OK Mono C# TESTS 22 46 0 1500
51878479 nemars D March 26, 2019, 9:13 p.m. OK Mono C# TESTS 22 46 102400 1500
36764012 dilshod.ismoilzod D March 31, 2018, 5:36 a.m. OK Mono C# TESTS 22 46 8089600 1500
55615016 m1_k3 D June 16, 2019, 8:23 a.m. OK Mono C# TESTS 22 61 0 1500
53273127 treasuryonly D April 25, 2019, 7:43 a.m. OK Mono C# TESTS 22 61 102400 1500
27968940 ToLate D June 22, 2017, 4:06 p.m. OK Mono C# TESTS 22 61 11571200 1500
26830610 Sorryforpartyrocking D May 4, 2017, 8:28 a.m. OK MS C# TESTS 22 46 204800 1500
18056580 qupear D May 24, 2016, 2:04 p.m. OK MS C# TESTS 22 46 9011200 1500
18093469 qupear D May 25, 2016, 8:13 p.m. OK MS C# TESTS 22 46 9216000 1500
23642737 artsin666 D Jan. 8, 2017, 8:31 a.m. OK MS C# TESTS 22 62 9216000 1500
18093021 qupear D May 25, 2016, 7:39 p.m. OK MS C# TESTS 22 62 9216000 1500
17376062 Mem D April 18, 2016, 12:51 p.m. OK MS C# TESTS 22 77 11673600 1500
17554137 dinnot D April 28, 2016, 2:48 p.m. OK MS C# TESTS 22 77 11776000 1500
17885384 sashaal D May 13, 2016, 7:49 a.m. OK MS C# TESTS 22 77 11776000 1500
17287474 unkoll0 D April 12, 2016, 8:57 a.m. OK MS C++ TESTS 22 15 0 1500
17287454 stocks D April 12, 2016, 8:56 a.m. OK MS C++ TESTS 22 15 0 1500
17282215 Perminova D April 11, 2016, 6:36 p.m. OK MS C++ TESTS 22 15 0 1500
22509185 nikdenev D Nov. 26, 2016, 12:38 p.m. OK MS C++ TESTS 22 15 0 1500
40665006 vjudge4 D July 23, 2018, 9:12 a.m. OK MS C++ TESTS 22 15 0 1500
22106345 irain D Nov. 8, 2016, 6:04 a.m. OK MS C++ TESTS 22 15 0 1500
19190433 dklsfjlksdfj D July 17, 2016, 1:01 p.m. OK MS C++ TESTS 22 15 0 1500
18868863 LoDThe D July 3, 2016, 2:35 p.m. OK MS C++ TESTS 22 15 0 1500
17323400 HeyZOJian D April 15, 2016, 7:27 a.m. OK MS C++ TESTS 22 15 0 1500
17292877 nikivas D April 12, 2016, 4:52 p.m. OK MS C++ TESTS 22 15 0 1500
59650870 vjudge5 D Aug. 29, 2019, 8:09 a.m. OK MS C++ 2017 TESTS 22 30 0 1500
56704850 natalia18 D July 8, 2019, 10:41 a.m. OK MS C++ 2017 TESTS 22 31 0 1500
64413797 vjudge3 D Nov. 6, 2019, 4:52 p.m. OK MS C++ 2017 TESTS 22 31 0 1500
55962825 Astronomax D June 23, 2019, 10:27 a.m. OK MS C++ 2017 TESTS 22 31 0 1500
53031021 willianpacheco31 D April 20, 2019, 12:09 a.m. OK MS C++ 2017 TESTS 22 31 0 1500
64532000 vjudge2 D Nov. 8, 2019, 3:43 p.m. OK MS C++ 2017 TESTS 22 31 307200 1500
68458316 darkus-_- D Jan. 9, 2020, 5:07 p.m. OK MS C++ 2017 TESTS 22 46 307200 1500
35887918 ______M______ D March 3, 2018, 2:13 p.m. OK Perl TESTS 22 30 2252800 1500
17418824 WNS_hh D April 21, 2016, 12:30 p.m. OK Perl TESTS 22 31 2252800 1500
22382256 BleedingEdge D Nov. 21, 2016, 11:55 a.m. OK PyPy 2 TESTS 22 93 512000 1500
18207936 cocofsu D June 2, 2016, 1:23 a.m. OK PyPy 2 TESTS 22 108 23040000 1500
17508557 Wizmann D April 25, 2016, 12:22 p.m. OK PyPy 2 TESTS 22 124 22937600 1500
23329323 ragingbull D Dec. 25, 2016, 9:55 p.m. OK PyPy 2 TESTS 22 171 22630400 1500
27528193 runar.hovland D June 2, 2017, 4:34 p.m. OK PyPy 3 TESTS 22 93 0 1500
62212091 UTMoonlight D Oct. 9, 2019, 2:48 p.m. OK PyPy 3 TESTS 22 140 0 1500
51479112 lerooo D March 19, 2019, 10:44 a.m. OK PyPy 3 TESTS 22 140 0 1500
21279090 Stresshoover D Oct. 8, 2016, 11:44 a.m. OK PyPy 3 TESTS 22 140 23244800 1500
17828103 michelebg D May 10, 2016, 6:46 a.m. OK PyPy 3 TESTS 22 140 23449600 1500
52575799 shiv1470 D April 10, 2019, 4:19 p.m. OK PyPy 3 TESTS 22 155 307200 1500
62897548 EdsonNeves D Oct. 19, 2019, 1:45 a.m. OK PyPy 3 TESTS 22 155 1433600 1500
59102544 victorhugo.daniel123 D Aug. 19, 2019, 4:39 p.m. OK PyPy 3 TESTS 22 155 1433600 1500
17397088 mplaton D April 20, 2016, 9:38 a.m. OK PyPy 3 TESTS 22 155 23347200 1500
50298974 vjudge1 D Feb. 22, 2019, 12:03 a.m. OK PyPy 3 TESTS 22 156 409600 1500
20416201 chill21 D Sept. 6, 2016, 9:49 a.m. OK Python 2 TESTS 22 46 0 1500
17561930 lgn D April 29, 2016, 6:48 a.m. OK Python 2 TESTS 22 46 4710400 1500
29363518 Khushboo05 D Aug. 11, 2017, 8:37 p.m. OK Python 2 TESTS 22 46 4710400 1500
17480609 wateret D April 24, 2016, 2:52 p.m. OK Python 2 TESTS 22 46 4710400 1500
31037624 dthung1602 D Oct. 5, 2017, 2:44 p.m. OK Python 2 TESTS 22 61 0 1500
17310878 masonsbro D April 14, 2016, 6:59 a.m. OK Python 2 TESTS 22 61 307200 1500
24510976 AR_Munna D Feb. 7, 2017, 7:32 p.m. OK Python 2 TESTS 22 61 4710400 1500
17480596 vjudge3 D April 24, 2016, 2:51 p.m. OK Python 2 TESTS 22 61 4710400 1500
17400516 m7mdkamal D April 20, 2016, 1:59 p.m. OK Python 2 TESTS 22 61 4710400 1500
17338568 108anup D April 16, 2016, 10:39 a.m. OK Python 2 TESTS 22 62 102400 1500
21990377 sbagan D Nov. 2, 2016, 12:05 p.m. OK Python 3 TESTS 22 46 307200 1500
29277489 jt3698 D Aug. 8, 2017, 4:39 a.m. OK Python 3 TESTS 22 46 4608000 1500
25221827 YazanRi D March 4, 2017, 4:59 p.m. OK Python 3 TESTS 22 46 4608000 1500
22722671 vjudge1 D Dec. 6, 2016, 4:28 a.m. OK Python 3 TESTS 22 61 0 1500
24825564 maratonando2 D Feb. 20, 2017, 3:54 p.m. OK Python 3 TESTS 22 61 4608000 1500
33590748 pkugsmjc D Dec. 24, 2017, 10:41 a.m. OK Python 3 TESTS 22 61 5632000 1500
32205013 maratonando3 D Nov. 10, 2017, 8:02 p.m. OK Python 3 TESTS 22 62 0 1500
32202764 henrifac D Nov. 10, 2017, 6:10 p.m. OK Python 3 TESTS 22 62 0 1500
31699461 QuanQqqqq D Oct. 25, 2017, 5:31 a.m. OK Python 3 TESTS 22 62 0 1500
27899348 vjudge1 D June 19, 2017, 8:16 a.m. OK Python 3 TESTS 22 62 0 1500
17378507 _ShadowSong D April 18, 2016, 4:02 p.m. OK Ruby TESTS 22 92 6656000 1500
18486480 MoOfMo D June 15, 2016, 3:17 a.m. OK Ruby TESTS 22 93 6656000 1500
17726634 reldan D May 5, 2016, 4:27 p.m. OK Scala TESTS 22 311 39833600 1500

remove filters

Back to search problems