Codeforces Round 562 (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
1169 Codeforces Round 562 (Div. 2) FINISHED False 7200 172938299 May 26, 2019, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11977 ) A Circle Metro PROGRAMMING implementation math 1000

B'The circle line of the Roflanpolis subway has n stations. There are two parallel routes in the subway. The first one visits stations in order 1 to 2 to ldots to n to 1 to 2 to ldots (so the next stop after station x is equal to (x+1) if x < n and 1 otherwise). The second route visits stations in order n to (n-1) to ldots to 1 to n to (n-1) to ldots (so the next stop after station x is equal to (x-1) if x>1 and n otherwise). All trains depart their stations simultaneously, and it takes exactly 1 minute to arrive at the next station. Two toads live in this city, their names are Daniel and Vlad. Daniel is currently in a train of the first route at station a and will exit the subway when his train reaches station x . Coincidentally, Vlad is currently in a train of the second route at station b and he will exit the subway when his train reaches station y . Surprisingly, all numbers a,x,b,y are distinct. Toad Ilya asks you to check if Daniel and Vlad will ever be at the same station at the same time during their journey. In other words, check if there is a moment when their trains stop at the same station. Note that this includes the moments when Daniel or Vlad enter or leave the subway. The first line contains five space-separated integers n , a , x , b , y ( 4 <= q n <= q 100 , 1 <= q a, x, b, y <= q n , all numbers among a , x , b , y are distinct) -- the number of stations in Roflanpolis, Daniel 's start station, Daniel 's finish station, Vlad 's start station and Vlad 's finish station, respectively. Output "YES" if there is a time moment when Vlad and Daniel are at the same station, and "NO" otherwise. You can print each letter in any case (upper or lower). In the first example, Daniel and Vlad start at the stations (1, 3) . One minute later they are at stations (2, 2) . They are'...

Tutorials

Codeforces Round #562 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
58235882 Anastasya235 A Aug. 3, 2019, 7:31 p.m. OK Clang++17 Diagnostics TESTS 85 46 0 1000
61194302 DTUPIS A Sept. 24, 2019, 4:45 a.m. OK Clang++17 Diagnostics TESTS 85 46 0 1000
54997892 arc_codeforces A June 3, 2019, 1:38 a.m. OK Clang++17 Diagnostics TESTS 85 62 0 1000
54677399 ruban A May 26, 2019, 4:02 p.m. OK Delphi TESTS 85 31 16793600 1000
54675263 TranKha A May 26, 2019, 3:54 p.m. OK FPC TESTS 85 31 0 1000
54680134 giahung.nguyentrong A May 26, 2019, 4:14 p.m. OK FPC TESTS 85 31 0 1000
54746523 JackTVN A May 28, 2019, 10:51 a.m. OK FPC TESTS 85 31 0 1000
54831325 HQT2003 A May 30, 2019, 9:02 a.m. OK FPC TESTS 85 31 0 1000
54820758 minhquaningenious A May 30, 2019, 2:23 a.m. OK FPC TESTS 85 31 102400 1000
54677310 LaSWeeG A May 26, 2019, 4:01 p.m. OK FPC TESTS 85 31 102400 1000
54670647 PhuongPeu A May 26, 2019, 3:41 p.m. OK FPC TESTS 85 31 102400 1000
55100718 Arteni_Cristi A June 4, 2019, 8:02 p.m. OK FPC TESTS 85 31 204800 1000
54683173 SpamBot A May 26, 2019, 4:30 p.m. OK FPC TESTS 85 31 307200 1000
54671176 omlgg A May 26, 2019, 3:42 p.m. OK FPC TESTS 85 31 307200 1000
57300981 srijamk A July 18, 2019, 11:31 p.m. OK GNU C11 TESTS 85 30 0 1000
67483210 gopika A Dec. 23, 2019, 4:37 p.m. OK GNU C11 TESTS 85 31 0 1000
68142983 abdu95873 A Jan. 4, 2020, 1:14 a.m. OK GNU C11 TESTS 85 31 0 1000
68188140 rashedcse A Jan. 4, 2020, 1:37 p.m. OK GNU C11 TESTS 85 31 0 1000
68674637 Israt_Jahan_Nahin A Jan. 12, 2020, 6:05 p.m. OK GNU C11 TESTS 85 31 0 1000
69002073 Compiler_Error A Jan. 17, 2020, 8:09 p.m. OK GNU C11 TESTS 85 31 0 1000
69435648 ndaidemf A Jan. 23, 2020, 6:51 p.m. OK GNU C11 TESTS 85 31 0 1000
69675717 radlid A Jan. 28, 2020, 2:13 p.m. OK GNU C11 TESTS 85 31 0 1000
67240088 GopaVasanth A Dec. 19, 2019, 4:26 p.m. OK GNU C11 TESTS 85 31 0 1000
67454060 stormborn A Dec. 23, 2019, 5:59 a.m. OK GNU C11 TESTS 85 31 0 1000
54865778 Joel_Lee_Wai_Kit A May 31, 2019, 6:06 a.m. OK GNU C++11 TESTS 85 30 0 1000
69187704 amin1998 A Jan. 20, 2020, 12:30 p.m. OK GNU C++11 TESTS 85 31 0 1000
69240030 shn.. A Jan. 21, 2020, 11:04 a.m. OK GNU C++11 TESTS 85 31 0 1000
69503187 iam_kp_ A Jan. 25, 2020, 7:25 a.m. OK GNU C++11 TESTS 85 31 0 1000
69593224 Goobyee A Jan. 27, 2020, 2:26 a.m. OK GNU C++11 TESTS 85 31 0 1000
69674592 peedohens A Jan. 28, 2020, 1:56 p.m. OK GNU C++11 TESTS 85 31 0 1000
69805768 Herlo A Jan. 30, 2020, 1:44 a.m. OK GNU C++11 TESTS 85 31 0 1000
69907724 cckk4467 A Jan. 31, 2020, 2:34 p.m. OK GNU C++11 TESTS 85 31 0 1000
68852900 vjudge4 A Jan. 15, 2020, 9:39 a.m. OK GNU C++11 TESTS 85 31 0 1000
69172751 luogu_bot3 A Jan. 20, 2020, 6:50 a.m. OK GNU C++11 TESTS 85 31 0 1000
54805339 RaghavS A May 29, 2019, 1:49 p.m. OK GNU C++14 TESTS 85 15 0 1000
54696779 Riad.IIT7 A May 26, 2019, 7:32 p.m. OK GNU C++14 TESTS 85 15 24064000 1000
59528655 I_am_insane A Aug. 26, 2019, 2:14 p.m. OK GNU C++14 TESTS 85 30 0 1000
67316599 Adi1169 A Dec. 21, 2019, 6:19 a.m. OK GNU C++14 TESTS 85 30 0 1000
66620697 nils_sjoberg A Dec. 11, 2019, 6:48 a.m. OK GNU C++14 TESTS 85 30 0 1000
66002612 D_Coder_03 A Nov. 29, 2019, 7:46 p.m. OK GNU C++14 TESTS 85 30 0 1000
61449939 FCUKmodiBhakts A Sept. 29, 2019, 1:36 a.m. OK GNU C++14 TESTS 85 30 0 1000
60528197 aj4941 A Sept. 14, 2019, 11:15 a.m. OK GNU C++14 TESTS 85 30 0 1000
60327997 proin6months A Sept. 10, 2019, 3:33 a.m. OK GNU C++14 TESTS 85 30 0 1000
60316296 sumitsaraff5482 A Sept. 9, 2019, 6:04 p.m. OK GNU C++14 TESTS 85 30 0 1000
54706026 aryanredcoder A May 27, 2019, 5:07 a.m. OK GNU C++17 TESTS 85 15 0 1000
59936858 pustaczek A Sept. 3, 2019, 9:50 a.m. OK GNU C++17 TESTS 85 30 0 1000
62827570 tahirmuri A Oct. 17, 2019, 6:35 p.m. OK GNU C++17 TESTS 85 30 0 1000
63108497 I_was_batman A Oct. 22, 2019, 6:16 a.m. OK GNU C++17 TESTS 85 30 0 1000
65829329 vjudge1 A Nov. 27, 2019, 1:46 p.m. OK GNU C++17 TESTS 85 30 0 1000
61318608 narayanpai1 maverick16 L_lawliet27 A Sept. 26, 2019, 11:53 a.m. OK GNU C++17 TESTS 85 30 0 1000
67314106 kutbilim.one A Dec. 21, 2019, 5:01 a.m. OK GNU C++17 TESTS 85 30 0 1000
68428311 utkarshkhandelwal199 A Jan. 9, 2020, 5:21 a.m. OK GNU C++17 TESTS 85 30 0 1000
68471132 angrysqrt3 A Jan. 10, 2020, 1:46 a.m. OK GNU C++17 TESTS 85 30 0 1000
66457345 happy_ A Dec. 7, 2019, 1:37 p.m. OK GNU C++17 TESTS 85 30 0 1000
57783589 TangentDay A July 26, 2019, 6:55 a.m. OK Go TESTS 85 31 0 1000
55242466 abdolsamad A June 7, 2019, 11:49 a.m. OK Go TESTS 85 31 0 1000
54909904 devACE A June 1, 2019, 10:37 a.m. OK Go TESTS 85 31 0 1000
54734336 Lancern A May 28, 2019, 3:42 a.m. OK Go TESTS 85 31 0 1000
54701462 node44 A May 27, 2019, 12:12 a.m. OK Go TESTS 85 31 0 1000
54707442 suryanshv23 A May 27, 2019, 5:59 a.m. OK Go TESTS 85 46 0 1000
54670295 node44 A May 26, 2019, 3:40 p.m. OK Go TESTS 85 46 0 1000
54671342 ak_j17_258749 A May 26, 2019, 3:43 p.m. OK Go TESTS 85 46 716800 1000
69472281 torext A Jan. 24, 2020, 2:56 p.m. OK Haskell TESTS 85 46 102400 1000
54670890 torus711 A May 26, 2019, 3:42 p.m. OK Haskell TESTS 85 46 102400 1000
67767140 satya_p54 A Dec. 28, 2019, 4:46 a.m. OK Java 11 TESTS 85 186 0 1000
69412954 warrioramrit A Jan. 23, 2020, 12:14 p.m. OK Java 11 TESTS 85 186 0 1000
67487506 SAforce A Dec. 23, 2019, 6:03 p.m. OK Java 11 TESTS 85 202 0 1000
67454722 dav14 A Dec. 23, 2019, 6:19 a.m. OK Java 11 TESTS 85 202 0 1000
67203381 ahv15 A Dec. 19, 2019, 11:38 a.m. OK Java 11 TESTS 85 218 0 1000
67203231 dav14 A Dec. 19, 2019, 11:36 a.m. OK Java 11 TESTS 85 218 0 1000
65086637 zekigurbuz A Nov. 15, 2019, 5:13 p.m. OK Java 8 TESTS 85 109 0 1000
61972671 pchunarkar1998 A Oct. 6, 2019, 9:32 a.m. OK Java 8 TESTS 85 109 0 1000
61436064 formalist A Sept. 28, 2019, 4:40 p.m. OK Java 8 TESTS 85 109 0 1000
61291145 arun319 A Sept. 25, 2019, 8:46 p.m. OK Java 8 TESTS 85 109 0 1000
60196742 babang A Sept. 7, 2019, 2:20 a.m. OK Java 8 TESTS 85 109 0 1000
59141007 Jarik A Aug. 20, 2019, 2:25 p.m. OK Java 8 TESTS 85 109 0 1000
56069557 osama.bmaq A June 26, 2019, 9:42 a.m. OK Java 8 TESTS 85 109 0 1000
56018087 optimaniax A June 24, 2019, 11:33 p.m. OK Java 8 TESTS 85 109 0 1000
55695200 Bashar. A June 17, 2019, 9:08 p.m. OK Java 8 TESTS 85 109 0 1000
55556875 cribabby A June 14, 2019, 10:23 a.m. OK Java 8 TESTS 85 109 0 1000
68694082 ChiNhan A Jan. 13, 2020, 7:18 a.m. OK JavaScript TESTS 85 46 0 1000
54748415 DeadPillow A May 28, 2019, 11:41 a.m. OK Kotlin TESTS 85 124 0 1000
54720966 timurtibeyev A May 27, 2019, 5:22 p.m. OK Kotlin TESTS 85 124 0 1000
54672697 xxx_alisher_xxx A May 26, 2019, 3:46 p.m. OK Kotlin TESTS 85 140 0 1000
56510184 hawwyo A July 4, 2019, 9:58 a.m. OK Kotlin TESTS 85 140 102400 1000
54698731 Deemo A May 26, 2019, 8:51 p.m. OK Kotlin TESTS 85 140 102400 1000
56493924 I.A.K.O.V A July 4, 2019, 1:22 a.m. OK Kotlin TESTS 85 155 0 1000
56048592 jonlik2 A June 25, 2019, 5:50 p.m. OK Kotlin TESTS 85 155 102400 1000
55091127 MattM A June 4, 2019, 2:35 p.m. OK Kotlin TESTS 85 155 102400 1000
54703229 KanhuKeNanu A May 27, 2019, 2:36 a.m. OK Kotlin TESTS 85 155 102400 1000
54692656 Dron-elektron A May 26, 2019, 5:32 p.m. OK Kotlin TESTS 85 155 102400 1000
54915591 og.kostya A June 1, 2019, 1:36 p.m. OK Mono C# TESTS 85 46 0 1000
54710495 TRR A May 27, 2019, 9:54 a.m. OK Mono C# TESTS 85 61 0 1000
54908480 m1_k3 A June 1, 2019, 9:56 a.m. OK Mono C# TESTS 85 62 0 1000
54892510 IleksaNott A May 31, 2019, 9:48 p.m. OK Mono C# TESTS 85 62 0 1000
54694229 sergmel A May 26, 2019, 6:23 p.m. OK Mono C# TESTS 85 62 0 1000
54680391 Giangvp A May 26, 2019, 4:15 p.m. OK Mono C# TESTS 85 62 0 1000
54671026 eki A May 26, 2019, 3:42 p.m. OK Mono C# TESTS 85 62 0 1000
54670940 mban259 A May 26, 2019, 3:42 p.m. OK Mono C# TESTS 85 62 0 1000
54670199 omikad A May 26, 2019, 3:40 p.m. OK Mono C# TESTS 85 62 0 1000
54713462 jose31309 A May 27, 2019, 11:51 a.m. OK Mono C# TESTS 85 62 1638400 1000
65829907 vjudge5 A Nov. 27, 2019, 1:54 p.m. OK MS C++ TESTS 85 31 0 1000
65746240 vjudge4 A Nov. 26, 2019, 12:21 p.m. OK MS C++ TESTS 85 31 0 1000
65489396 vjudge5 A Nov. 21, 2019, 2:01 p.m. OK MS C++ TESTS 85 31 0 1000
66550846 dipercf A Dec. 9, 2019, 2:51 p.m. OK MS C++ TESTS 85 31 0 1000
65131994 vjudge3 A Nov. 16, 2019, 4 a.m. OK MS C++ TESTS 85 31 0 1000
65026266 vjudge3 A Nov. 15, 2019, 7:50 a.m. OK MS C++ TESTS 85 31 0 1000
65024804 vjudge1 A Nov. 15, 2019, 7:07 a.m. OK MS C++ TESTS 85 31 0 1000
61774878 vjudge2 A Oct. 3, 2019, 11:24 a.m. OK MS C++ TESTS 85 31 0 1000
61771283 vjudge3 A Oct. 3, 2019, 10:16 a.m. OK MS C++ TESTS 85 31 0 1000
65831877 vjudge5 A Nov. 27, 2019, 2 p.m. OK MS C++ TESTS 85 31 0 1000
56446271 sladkayaKlubnichka A July 2, 2019, 6:59 p.m. OK MS C++ 2017 TESTS 85 31 0 1000
64302961 bk90 A Nov. 5, 2019, 10:40 a.m. OK MS C++ 2017 TESTS 85 31 0 1000
64302773 dundae A Nov. 5, 2019, 10:37 a.m. OK MS C++ 2017 TESTS 85 31 0 1000
62927494 Diabl0xx A Oct. 19, 2019, 11:45 a.m. OK MS C++ 2017 TESTS 85 31 0 1000
60472032 Moen1578 A Sept. 13, 2019, 6:06 a.m. OK MS C++ 2017 TESTS 85 31 0 1000
58174064 olesyaaaa A Aug. 2, 2019, 12:25 p.m. OK MS C++ 2017 TESTS 85 31 0 1000
57945501 yorky A July 29, 2019, 2:10 p.m. OK MS C++ 2017 TESTS 85 31 0 1000
57105612 vjudge4 A July 15, 2019, 3:12 p.m. OK MS C++ 2017 TESTS 85 31 0 1000
56809177 HPV A July 10, 2019, 3:14 p.m. OK MS C++ 2017 TESTS 85 31 0 1000
56762555 Mithridat A July 9, 2019, 4:35 p.m. OK MS C++ 2017 TESTS 85 31 0 1000
54803342 navneetcool A May 29, 2019, 12:55 p.m. OK Node.js TESTS 85 156 409600 1000
54802288 arkajitchoudhury143 A May 29, 2019, 12:27 p.m. OK Node.js TESTS 85 156 409600 1000
54689633 JARMAN A May 26, 2019, 5:12 p.m. OK Node.js TESTS 85 171 307200 1000
54677567 Erfan_Yazdpour A May 26, 2019, 4:02 p.m. OK Node.js TESTS 85 171 409600 1000
54669864 mm944 A May 26, 2019, 3:38 p.m. OK PascalABC.NET TESTS 85 327 409600 1000
54694115 CrazyDr A May 26, 2019, 6:21 p.m. OK PHP TESTS 85 46 0 1000
55531552 mayakin A June 13, 2019, 1:51 p.m. OK PHP TESTS 85 46 0 1000
55267875 lostamok A June 7, 2019, 3:01 p.m. OK PHP TESTS 85 46 409600 1000
54671742 anshuman16423 A May 26, 2019, 3:44 p.m. OK PyPy 2 TESTS 85 124 0 1000
54985150 Quirinius A June 2, 2019, 3:16 p.m. OK PyPy 2 TESTS 85 124 0 1000
54702458 pedrosorio A May 27, 2019, 1:39 a.m. OK PyPy 2 TESTS 85 124 0 1000
54694172 pein_7 A May 26, 2019, 6:22 p.m. OK PyPy 2 TESTS 85 124 0 1000
54672753 wangkan2001 A May 26, 2019, 3:46 p.m. OK PyPy 2 TESTS 85 124 0 1000
54675071 kbagoli1999 A May 26, 2019, 3:53 p.m. OK PyPy 2 TESTS 85 139 0 1000
54674953 c1729 A May 26, 2019, 3:53 p.m. OK PyPy 2 TESTS 85 139 0 1000
54677189 Mukundan314 A May 26, 2019, 4:01 p.m. OK PyPy 2 TESTS 85 140 0 1000
54675500 supersangjin A May 26, 2019, 3:54 p.m. OK PyPy 2 TESTS 85 140 0 1000
54671783 raj1307 A May 26, 2019, 3:44 p.m. OK PyPy 2 TESTS 85 140 0 1000
55181208 Leemur A June 5, 2019, 10:32 p.m. OK PyPy 3 TESTS 85 124 0 1000
54973182 modestas_ A June 2, 2019, 9:30 a.m. OK PyPy 3 TESTS 85 124 0 1000
54700191 pauloleitao A May 26, 2019, 10:20 p.m. OK PyPy 3 TESTS 85 124 0 1000
54695847 Mark_tven A May 26, 2019, 7:02 p.m. OK PyPy 3 TESTS 85 124 0 1000
58461097 Harrry A Aug. 8, 2019, 4:33 p.m. OK PyPy 3 TESTS 85 124 102400 1000
55235853 Limeni A June 7, 2019, 8:24 a.m. OK PyPy 3 TESTS 85 139 0 1000
55016110 cavi4762 A June 3, 2019, 12:25 p.m. OK PyPy 3 TESTS 85 139 0 1000
55001037 atharva456 A June 3, 2019, 4:31 a.m. OK PyPy 3 TESTS 85 139 0 1000
54902809 grhkm A June 1, 2019, 7:30 a.m. OK PyPy 3 TESTS 85 139 0 1000
69925097 Unpossible A Jan. 31, 2020, 7:59 p.m. OK PyPy 3 TESTS 85 140 0 1000
54871199 shubhankarsharma00 A May 31, 2019, 9:21 a.m. OK Python 2 TESTS 85 171 0 1000
54783817 franckmy A May 29, 2019, 1:47 a.m. OK Python 2 TESTS 85 171 0 1000
54733568 29029 A May 28, 2019, 3:01 a.m. OK Python 2 TESTS 85 171 0 1000
54728757 kaif_7 A May 27, 2019, 9:13 p.m. OK Python 2 TESTS 85 171 0 1000
54693229 beriefing A May 26, 2019, 5:34 p.m. OK Python 2 TESTS 85 171 0 1000
54672219 SoSooding A May 26, 2019, 3:45 p.m. OK Python 2 TESTS 85 171 0 1000
54695412 AWB29 A May 26, 2019, 6:49 p.m. OK Python 2 TESTS 85 186 0 1000
54675672 kpiiitb A May 26, 2019, 3:55 p.m. OK Python 2 TESTS 85 186 0 1000
54674833 recurze A May 26, 2019, 3:52 p.m. OK Python 2 TESTS 85 186 0 1000
54671662 Skand A May 26, 2019, 3:44 p.m. OK Python 2 TESTS 85 186 0 1000
55278862 zhuodannychen A June 7, 2019, 9:35 p.m. OK Python 3 TESTS 85 108 0 1000
54871814 xmena A May 31, 2019, 9:39 a.m. OK Python 3 TESTS 85 108 0 1000
54722809 ovi_ivo A May 27, 2019, 6:21 p.m. OK Python 3 TESTS 85 108 0 1000
68326727 abhishekbvs A Jan. 6, 2020, 5:09 p.m. OK Python 3 TESTS 85 109 0 1000
67209071 chromicle A Dec. 19, 2019, 1:25 p.m. OK Python 3 TESTS 85 109 0 1000
66410480 tidu149 A Dec. 6, 2019, 3:09 p.m. OK Python 3 TESTS 85 109 0 1000
65108404 integer15 A Nov. 15, 2019, 8:32 p.m. OK Python 3 TESTS 85 109 0 1000
63700468 MinecraftFuns A Oct. 29, 2019, 7:09 a.m. OK Python 3 TESTS 85 109 0 1000
61031662 imshahid A Sept. 21, 2019, 5:56 p.m. OK Python 3 TESTS 85 109 0 1000
60696615 KnightKnight A Sept. 16, 2019, 7:59 p.m. OK Python 3 TESTS 85 109 0 1000
54670710 koikotya A May 26, 2019, 3:41 p.m. OK Ruby TESTS 85 62 0 1000
67485827 swathi_kasikala A Dec. 23, 2019, 5:25 p.m. OK Ruby TESTS 85 93 102400 1000
55067851 0kaguya A June 4, 2019, 4:46 a.m. OK Rust TESTS 85 31 0 1000
55003894 yoshrc A June 3, 2019, 6:24 a.m. OK Rust TESTS 85 31 0 1000
54681376 slowlight A May 26, 2019, 4:20 p.m. OK Rust TESTS 85 31 0 1000
54679684 SID_ A May 26, 2019, 4:12 p.m. OK Scala TESTS 85 499 0 1000

remove filters

Back to search problems