Codeforces Round 579 (Div. 3)

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
1203 Codeforces Round 579 (Div. 3) FINISHED False 8400 166116299 Aug. 13, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16730 ) A Circle of Students PROGRAMMING implementation 1100

B'There are n students standing in a circle in some order. The index of the i -th student is p_i . It is guaranteed that all indices of students are distinct integers from 1 to n (i. xe2 x80 x89e. they form a permutation). Students want to start a round dance. A clockwise round dance can be started if the student 2 comes right after the student 1 in clockwise order (there are no students between them), the student 3 comes right after the student 2 in clockwise order, and so on, and the student n comes right after the student n - 1 in clockwise order. A counterclockwise round dance is almost the same thing -- the only difference is that the student i should be right after the student i - 1 in counterclockwise order (this condition should be met for every i from 2 to n ). For example, if the indices of students listed in clockwise order are [2, 3, 4, 5, 1] , then they can start a clockwise round dance. If the students have indices [3, 2, 1, 4] in clockwise order, then they can start a counterclockwise round dance. Your task is to determine whether it is possible to start a round dance. Note that the students cannot change their positions before starting the dance; they cannot swap or leave the circle, and no other student can enter the circle. You have to answer q independent queries. The first line of the input contains one integer q ( 1 <= q <= 200 ) -- the number of queries. Then q queries follow. The first line of the query contains one integer n ( 1 <= n <= 200 ) -- the number of students. The second line of the query contains a permutation of indices p_1, p_2, ... , p_n ( 1 <= p_i <= n ), where p_i is the index of the i -th student (in clockwise order). It is guaranteed that all p_i are distinct integers from 1 to n (i. xe2 x80 x89e. they form a permutation). For each query, print the ans'...

Tutorials

Codeforces Round #579 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
66655364 vjudge4 A Dec. 11, 2019, 10:04 p.m. OK Clang++17 Diagnostics TESTS 9 155 0 1100
60567551 Denor A Sept. 14, 2019, 3:12 p.m. OK Delphi TESTS 9 30 0 1100
58889167 aigeyser2608 A Aug. 16, 2019, 4:23 a.m. OK FPC TESTS 9 31 102400 1100
59569294 rishiraje A Aug. 27, 2019, 11:57 a.m. OK GNU C11 TESTS 9 15 0 1100
61388412 MSurfer A Sept. 27, 2019, 8:06 p.m. OK GNU C11 TESTS 9 15 0 1100
60478161 vjudge1 A Sept. 13, 2019, 9:13 a.m. OK GNU C11 TESTS 9 30 0 1100
60275455 sheam A Sept. 8, 2019, 5:32 p.m. OK GNU C11 TESTS 9 30 0 1100
65820288 MOHIR_MBSTU A Nov. 27, 2019, 10:09 a.m. OK GNU C11 TESTS 9 30 0 1100
65567440 yakushovaa0202 A Nov. 23, 2019, 6:30 a.m. OK GNU C11 TESTS 9 30 0 1100
65157089 DevJewel A Nov. 16, 2019, 9:47 a.m. OK GNU C11 TESTS 9 30 0 1100
64831401 rocketcress A Nov. 13, 2019, 3:52 p.m. OK GNU C11 TESTS 9 30 0 1100
62961136 Bispo A Oct. 20, 2019, 12:41 a.m. OK GNU C11 TESTS 9 30 0 1100
60595915 cruisermaniac A Sept. 15, 2019, 5:35 a.m. OK GNU C11 TESTS 9 30 0 1100
59926179 AlbertPenny A Sept. 3, 2019, 4:10 a.m. OK GNU C++11 TESTS 9 15 0 1100
59842092 Y_cour A Sept. 1, 2019, 7:44 a.m. OK GNU C++11 TESTS 9 15 0 1100
59651499 luogu_bot4 A Aug. 29, 2019, 8:25 a.m. OK GNU C++11 TESTS 9 15 0 1100
59615301 Ironbeliever A Aug. 28, 2019, 12:27 p.m. OK GNU C++11 TESTS 9 15 0 1100
69594367 cornivores A Jan. 27, 2020, 3:27 a.m. OK GNU C++11 TESTS 9 15 0 1100
66548507 LUO__W A Dec. 9, 2019, 2:02 p.m. OK GNU C++11 TESTS 9 15 0 1100
65573828 xiximo1204 A Nov. 23, 2019, 8:43 a.m. OK GNU C++11 TESTS 9 15 0 1100
60481070 vjudge2 A Sept. 13, 2019, 10:29 a.m. OK GNU C++11 TESTS 9 15 0 1100
60154911 xiaolongbao A Sept. 6, 2019, 6:21 a.m. OK GNU C++11 TESTS 9 15 0 1100
60071031 Rose__ A Sept. 5, 2019, 11:07 a.m. OK GNU C++11 TESTS 9 15 0 1100
67855239 THEphantom A Dec. 29, 2019, 5:47 a.m. OK GNU C++14 TESTS 9 15 0 1100
68105181 _Comfortably_Numb__ A Jan. 3, 2020, 6:36 a.m. OK GNU C++14 TESTS 9 15 0 1100
69097307 vjudge4 A Jan. 19, 2020, 12:34 p.m. OK GNU C++14 TESTS 9 15 0 1100
69186158 sanjayshreejain A Jan. 20, 2020, 12:01 p.m. OK GNU C++14 TESTS 9 15 0 1100
67853230 Swarn10 A Dec. 29, 2019, 4:43 a.m. OK GNU C++14 TESTS 9 15 0 1100
66370907 _shango_ A Dec. 5, 2019, 10:03 p.m. OK GNU C++14 TESTS 9 15 0 1100
64852629 Ragnar97 A Nov. 13, 2019, 8:27 p.m. OK GNU C++14 TESTS 9 15 0 1100
64792267 Akshay184 A Nov. 13, 2019, 11:39 a.m. OK GNU C++14 TESTS 9 15 0 1100
64542666 NEZZ A Nov. 8, 2019, 7:15 p.m. OK GNU C++14 TESTS 9 15 0 1100
63069646 Kuzey A Oct. 21, 2019, noon OK GNU C++14 TESTS 9 15 0 1100
69244468 bundibedu A Jan. 21, 2020, 12:28 p.m. OK GNU C++17 TESTS 9 15 0 1100
69651757 suchtig_werden A Jan. 28, 2020, 5:37 a.m. OK GNU C++17 TESTS 9 15 0 1100
69497668 vjudge5 A Jan. 25, 2020, 5:05 a.m. OK GNU C++17 TESTS 9 15 0 1100
69392282 amritx8 A Jan. 23, 2020, 4:24 a.m. OK GNU C++17 TESTS 9 15 0 1100
69259055 Nitesh612 A Jan. 21, 2020, 4:30 p.m. OK GNU C++17 TESTS 9 15 0 1100
68203683 jeanshighntight A Jan. 4, 2020, 4:44 p.m. OK GNU C++17 TESTS 9 15 0 1100
68083134 Anmol A Jan. 2, 2020, 3:09 p.m. OK GNU C++17 TESTS 9 15 0 1100
68010917 AbisaX A Dec. 31, 2019, 3:44 p.m. OK GNU C++17 TESTS 9 15 0 1100
67663987 sampler232 A Dec. 26, 2019, 5:02 p.m. OK GNU C++17 TESTS 9 15 0 1100
67469094 exponetial A Dec. 23, 2019, 12:09 p.m. OK GNU C++17 TESTS 9 15 0 1100
59618012 reanimatorzon A Aug. 28, 2019, 1:22 p.m. OK Go TESTS 9 15 0 1100
58874083 fr3aky A Aug. 15, 2019, 4:52 p.m. OK Go TESTS 9 31 0 1100
58917322 raunaqrox A Aug. 16, 2019, 3:32 p.m. OK Go TESTS 9 46 0 1100
59696462 serhiimazurok A Aug. 30, 2019, 8:48 a.m. OK Go TESTS 9 62 0 1100
59622657 yang12138 A Aug. 28, 2019, 2:44 p.m. OK Go TESTS 9 421 0 1100
59695517 mangojunior A Aug. 30, 2019, 8:23 a.m. OK Haskell TESTS 9 93 102400 1100
58973678 rmaccrimmon A Aug. 17, 2019, 10:13 p.m. OK Haskell TESTS 9 93 3174400 1100
59891681 vjudge1 A Sept. 2, 2019, 10:38 a.m. OK Haskell TESTS 9 109 3174400 1100
66636664 satya_p54 A Dec. 11, 2019, 1:10 p.m. OK Java 11 TESTS 9 170 0 1100
67596426 noobie_code A Dec. 25, 2019, 10:48 a.m. OK Java 11 TESTS 9 233 0 1100
69916188 udayps055 A Jan. 31, 2020, 4:55 p.m. OK Java 11 TESTS 9 264 0 1100
59265659 arnavks97 A Aug. 22, 2019, 10:36 a.m. OK Java 8 TESTS 9 93 0 1100
59064171 stormclass A Aug. 19, 2019, 12:50 a.m. OK Java 8 TESTS 9 93 0 1100
58920868 jakejase2 A Aug. 16, 2019, 5:06 p.m. OK Java 8 TESTS 9 93 0 1100
65472504 sakt_coder A Nov. 21, 2019, 8:52 a.m. OK Java 8 TESTS 9 108 0 1100
61838924 vladyashko A Oct. 4, 2019, 8:58 a.m. OK Java 8 TESTS 9 108 0 1100
61608463 mscreddy09 A Oct. 1, 2019, 1:25 p.m. OK Java 8 TESTS 9 108 0 1100
60647191 Mann_27__ A Sept. 15, 2019, 5:36 p.m. OK Java 8 TESTS 9 108 0 1100
60586530 housni A Sept. 14, 2019, 9:41 p.m. OK Java 8 TESTS 9 108 0 1100
59707324 deepak4669 A Aug. 30, 2019, 1:13 p.m. OK Java 8 TESTS 9 108 0 1100
59550271 GiantTornado A Aug. 27, 2019, 2:19 a.m. OK Java 8 TESTS 9 108 0 1100
69463229 Sparrow A Jan. 24, 2020, 11:44 a.m. OK JavaScript TESTS 9 30 1536000 1100
61551209 walborn A Sept. 30, 2019, 12:31 p.m. OK JavaScript TESTS 9 31 1433600 1100
58881146 kuzAnatoliy A Aug. 15, 2019, 9:15 p.m. OK JavaScript TESTS 9 46 1536000 1100
60173050 liouzhou_101 A Sept. 6, 2019, 1:36 p.m. OK Kotlin TESTS 9 124 0 1100
60637804 enslinmike A Sept. 15, 2019, 2:32 p.m. OK Kotlin TESTS 9 186 204800 1100
59265129 Alexander_Karpovich A Aug. 22, 2019, 10:21 a.m. OK Kotlin TESTS 9 186 716800 1100
59607916 hanel1164 A Aug. 28, 2019, 9:39 a.m. OK Kotlin TESTS 9 202 0 1100
59101019 og.kostya A Aug. 19, 2019, 4:04 p.m. OK Mono C# TESTS 9 46 204800 1100
59183872 IrishWhizzkid A Aug. 20, 2019, 5:52 p.m. OK Mono C# TESTS 9 46 2150400 1100
58898849 MahmudX A Aug. 16, 2019, 8:28 a.m. OK Mono C# TESTS 9 46 2355200 1100
59077531 shohag_16030 A Aug. 19, 2019, 7:45 a.m. OK Mono C# TESTS 9 61 2355200 1100
59107077 Anastasiya_Andreevna A Aug. 19, 2019, 6:30 p.m. OK Mono C# TESTS 9 62 2150400 1100
58941717 Dnisha A Aug. 17, 2019, 7:12 a.m. OK Mono C# TESTS 9 62 2457600 1100
60273671 m1_k3 A Sept. 8, 2019, 4:38 p.m. OK Mono C# TESTS 9 62 4198400 1100
58929921 0Karim A Aug. 16, 2019, 11 p.m. OK Mono C# TESTS 9 62 6348800 1100
62179105 NEvOl A Oct. 9, 2019, 5:43 a.m. OK Mono C# TESTS 9 62 6451200 1100
59085827 m.khooryani A Aug. 19, 2019, 11:01 a.m. OK Mono C# TESTS 9 77 6656000 1100
59439258 VIMINAREMAX A Aug. 25, 2019, 10:24 a.m. OK MS C++ TESTS 9 15 0 1100
66936733 vjudge2 A Dec. 15, 2019, 8:41 a.m. OK MS C++ TESTS 9 30 0 1100
58886627 necessary A Aug. 16, 2019, 2:37 a.m. OK MS C++ TESTS 9 30 0 1100
59126932 vjudge3 A Aug. 20, 2019, 9:28 a.m. OK MS C++ TESTS 9 30 0 1100
66786810 vjudge3 A Dec. 13, 2019, 1:56 p.m. OK MS C++ TESTS 9 30 0 1100
62755677 six-lyk-six A Oct. 17, 2019, 4:31 a.m. OK MS C++ TESTS 9 30 0 1100
59127403 vjudge5 A Aug. 20, 2019, 9:40 a.m. OK MS C++ TESTS 9 30 0 1100
59971781 WocBug A Sept. 4, 2019, 2:04 a.m. OK MS C++ TESTS 9 30 0 1100
60202395 vjudge2 A Sept. 7, 2019, 6:27 a.m. OK MS C++ TESTS 9 30 0 1100
67404064 vjudge3 A Dec. 22, 2019, 5:34 a.m. OK MS C++ TESTS 9 31 0 1100
58902916 FeierSarah A Aug. 16, 2019, 9:56 a.m. OK MS C++ 2017 TESTS 9 15 0 1100
60530653 kdnooij A Sept. 14, 2019, 12:17 p.m. OK MS C++ 2017 TESTS 9 30 0 1100
59880366 hwangganzi A Sept. 2, 2019, 4:22 a.m. OK MS C++ 2017 TESTS 9 30 0 1100
67852514 Red_rainOwO A Dec. 29, 2019, 4:12 a.m. OK MS C++ 2017 TESTS 9 30 0 1100
65694491 2019071055 A Nov. 25, 2019, 7:11 a.m. OK MS C++ 2017 TESTS 9 30 0 1100
60430765 YoshinariYoh A Sept. 12, 2019, 9:19 a.m. OK MS C++ 2017 TESTS 9 30 409600 1100
60389687 Straik A Sept. 11, 2019, 12:51 p.m. OK MS C++ 2017 TESTS 9 31 0 1100
66931911 vjudge4 A Dec. 15, 2019, 7:38 a.m. OK MS C++ 2017 TESTS 9 31 0 1100
60207964 Ayvery A Sept. 7, 2019, 8:56 a.m. OK MS C++ 2017 TESTS 9 31 0 1100
60155913 Falca A Sept. 6, 2019, 6:47 a.m. OK MS C++ 2017 TESTS 9 31 0 1100
59703858 toxahak A Aug. 30, 2019, 11:50 a.m. OK Node.js TESTS 9 155 4096000 1100
59642932 evanli2014 A Aug. 29, 2019, 3:29 a.m. OK Node.js TESTS 9 170 4710400 1100
59679884 SirodgevAlexander_ A Aug. 29, 2019, 7:59 p.m. OK PascalABC.NET TESTS 9 311 204800 1100
59238053 oshvid A Aug. 21, 2019, 6:18 p.m. OK PascalABC.NET TESTS 9 327 0 1100
58895874 _MIT A Aug. 16, 2019, 7:31 a.m. OK PyPy 2 TESTS 9 171 409600 1100
59687178 jergra43 A Aug. 30, 2019, 2:45 a.m. OK PyPy 3 TESTS 9 140 2150400 1100
59420586 Sorting A Aug. 24, 2019, 8:48 p.m. OK PyPy 3 TESTS 9 140 2457600 1100
69050756 tchr A Jan. 18, 2020, 12:38 p.m. OK PyPy 3 TESTS 9 155 1843200 1100
62430087 meritvarun A Oct. 12, 2019, 3:33 p.m. OK PyPy 3 TESTS 9 155 1945600 1100
59942624 ma.maiorova A Sept. 3, 2019, 11:59 a.m. OK PyPy 3 TESTS 9 155 2048000 1100
58897440 tapauline A Aug. 16, 2019, 8:03 a.m. OK PyPy 3 TESTS 9 155 2048000 1100
62881613 r_dmv A Oct. 18, 2019, 4:56 p.m. OK PyPy 3 TESTS 9 155 2150400 1100
61065524 Mehrdad_ravenS A Sept. 22, 2019, 10:56 a.m. OK PyPy 3 TESTS 9 155 2150400 1100
65719460 ng24_7 A Nov. 25, 2019, 6:15 p.m. OK PyPy 3 TESTS 9 155 2355200 1100
62879559 hmnid A Oct. 18, 2019, 4:24 p.m. OK PyPy 3 TESTS 9 155 2355200 1100
58914892 GayathriVenkatesh A Aug. 16, 2019, 2:33 p.m. OK Python 2 TESTS 9 171 307200 1100
68067606 bsr011 A Jan. 2, 2020, 8:40 a.m. OK Python 2 TESTS 9 186 307200 1100
60244658 mooseq A Sept. 8, 2019, 1:15 a.m. OK Python 2 TESTS 9 202 307200 1100
58972100 LeierKing A Aug. 17, 2019, 9:06 p.m. OK Python 2 TESTS 9 202 307200 1100
60296830 uncle_c A Sept. 9, 2019, 10:27 a.m. OK Python 2 TESTS 9 218 204800 1100
67521822 cp_noob A Dec. 24, 2019, 12:41 p.m. OK Python 3 TESTS 9 108 409600 1100
60821345 nameste A Sept. 19, 2019, 12:30 a.m. OK Python 3 TESTS 9 108 409600 1100
59895021 imshahid A Sept. 2, 2019, 11:49 a.m. OK Python 3 TESTS 9 109 0 1100
61330809 likli A Sept. 26, 2019, 2:56 p.m. OK Python 3 TESTS 9 109 102400 1100
60297598 azhukov A Sept. 9, 2019, 10:51 a.m. OK Python 3 TESTS 9 109 102400 1100
59791232 TorchRik A Aug. 31, 2019, 7:13 a.m. OK Python 3 TESTS 9 109 102400 1100
58984965 SinKing A Aug. 18, 2019, 6:37 a.m. OK Python 3 TESTS 9 109 102400 1100
58982859 seyari A Aug. 18, 2019, 5:27 a.m. OK Python 3 TESTS 9 109 102400 1100
58951353 Do_it_Now A Aug. 17, 2019, 11:07 a.m. OK Python 3 TESTS 9 109 102400 1100
58932029 yuxiangwang0829 A Aug. 17, 2019, 1:30 a.m. OK Python 3 TESTS 9 109 102400 1100
59598657 nemi_zzz A Aug. 28, 2019, 4:16 a.m. OK Ruby TESTS 9 78 716800 1100
61422332 shahjay147 A Sept. 28, 2019, 12:09 p.m. OK Ruby TESTS 9 93 409600 1100
59222255 Andrey_R A Aug. 21, 2019, 12:38 p.m. OK Ruby TESTS 9 108 8499200 1100
64372790 tuna_salad A Nov. 6, 2019, 2:52 p.m. OK Rust TESTS 9 30 512000 1100
65089589 maxglushkov561 A Nov. 15, 2019, 6:14 p.m. OK Rust TESTS 9 31 0 1100
59436020 vjudge1 A Aug. 25, 2019, 8:49 a.m. OK Rust TESTS 9 31 0 1100
59193046 WillToPower A Aug. 20, 2019, 11:04 p.m. OK Rust TESTS 9 31 0 1100
59355773 matijap A Aug. 23, 2019, 1:28 p.m. OK Rust TESTS 9 31 102400 1100
58997914 andreyrmg A Aug. 18, 2019, 12:18 p.m. OK Rust TESTS 9 31 2150400 1100
59057262 sam.ninja A Aug. 18, 2019, 7:28 p.m. OK Scala TESTS 9 561 0 1100

remove filters

Back to search problems