Educational Codeforces Round 37 (Rated for 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
920 Educational Codeforces Round 37 (Rated for Div. 2) FINISHED False 7200 219943524 Feb. 2, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9429 ) C Swap Adjacent Elements PROGRAMMING dfs and similar greedy math sortings two pointers 1500

B'You have an array a consisting of n integers. Each integer from 1 to n appears exactly once in this array. For some indices i (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89- xe2 x80 x891) it is possible to swap i-th element with (i xe2 x80 x89+ xe2 x80 x891)-th, for other indices it is not possible. You may perform any number of swapping operations any order. There is no limit on the number of times you swap i-th element with (i xe2 x80 x89+ xe2 x80 x891)-th (if the position is not forbidden). Can you make this array sorted in ascending order performing some sequence of swapping operations? The first line contains one integer n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89200000) -- the number of elements in the array. The second line contains n integers a1, a2, ..., an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89200000) -- the elements of the array. Each integer from 1 to n appears exactly once. The third line contains a string of n xe2 x80 x89- xe2 x80 x891 characters, each character is either 0 or 1. If i-th character is 1, then you can swap i-th element with (i xe2 x80 x89+ xe2 x80 x891)-th any number of times, otherwise it is forbidden to swap i-th element with (i xe2 x80 x89+ xe2 x80 x891)-th. If it is possible to sort the array in ascending order using any sequence of swaps you are allowed to make, print YES. Otherwise, print NO. In the first example you may swap a3 and a4, and then swap a4 and a5. '...

Tutorials

T

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
36152799 rabbitcxk C March 10, 2018, 2:01 p.m. OK FPC TESTS 139 46 4505600 1500
34966185 dambosin C Feb. 6, 2018, 9:31 a.m. OK FPC TESTS 139 61 6963200 1500
34871868 Jostic11 C Feb. 2, 2018, 5:44 p.m. OK FPC TESTS 139 61 50995200 1500
34871021 T.S.H.T C Feb. 2, 2018, 5:19 p.m. OK FPC TESTS 139 61 50995200 1500
34868935 TShT C Feb. 2, 2018, 4:43 p.m. OK FPC TESTS 139 61 50995200 1500
35214700 yourbeach C Feb. 13, 2018, 6:05 p.m. OK FPC TESTS 139 62 2662400 1500
35082847 Slonik C Feb. 9, 2018, 8:24 a.m. OK FPC TESTS 139 77 2457600 1500
34950764 gbrocks C Feb. 5, 2018, 5:19 p.m. OK GNU C TESTS 139 46 2662400 1500
35110821 jizhiyi C Feb. 10, 2018, 4:04 a.m. OK GNU C TESTS 139 46 2867200 1500
35106393 I_Love_U_Sohan C Feb. 9, 2018, 9:50 p.m. OK GNU C TESTS 139 46 2867200 1500
34920337 triptesh_b C Feb. 4, 2018, 10:42 a.m. OK GNU C TESTS 139 46 2867200 1500
34911658 Masonb C Feb. 4, 2018, 1:15 a.m. OK GNU C TESTS 139 46 3686400 1500
34911623 Masonb C Feb. 4, 2018, 1:11 a.m. OK GNU C TESTS 139 46 3686400 1500
34911103 yaochengwei C Feb. 4, 2018, 12:13 a.m. OK GNU C TESTS 139 46 3686400 1500
34890827 TUGAAAA C Feb. 3, 2018, 9:54 a.m. OK GNU C TESTS 139 46 3686400 1500
39251365 Kaneki123 C June 14, 2018, 6:32 p.m. OK GNU C TESTS 139 77 2560000 1500
39251196 Kaneki123 C June 14, 2018, 6:22 p.m. OK GNU C TESTS 139 77 2662400 1500
34992409 vjudge1 C Feb. 7, 2018, 8:17 a.m. OK GNU C++ TESTS 139 15 2867200 1500
35525964 byh C Feb. 20, 2018, 3:35 p.m. OK GNU C++ TESTS 139 15 3891200 1500
34914679 yzh666 C Feb. 4, 2018, 5:31 a.m. OK GNU C++ TESTS 139 15 5324800 1500
34912152 luogu_bot5 C Feb. 4, 2018, 2:01 a.m. OK GNU C++ TESTS 139 15 5324800 1500
34880235 redbag C Feb. 3, 2018, 2:28 a.m. OK GNU C++ TESTS 139 15 5324800 1500
34940572 vjudge5 C Feb. 5, 2018, 10:15 a.m. OK GNU C++ TESTS 139 30 2867200 1500
34939111 vjudge3 C Feb. 5, 2018, 9:10 a.m. OK GNU C++ TESTS 139 30 2867200 1500
35195301 Scut82 C Feb. 13, 2018, 9:37 a.m. OK GNU C++ TESTS 139 30 3072000 1500
34890392 luogu_bot2 C Feb. 3, 2018, 9:37 a.m. OK GNU C++ TESTS 139 30 3072000 1500
34890351 luogu_bot4 C Feb. 3, 2018, 9:36 a.m. OK GNU C++ TESTS 139 30 3072000 1500
69164742 kaiboy C Jan. 20, 2020, 2:55 a.m. OK GNU C11 TESTS 139 62 1024000 1500
69164552 kaiboy C Jan. 20, 2020, 2:48 a.m. OK GNU C11 TESTS 139 78 1024000 1500
34889081 gzy_cjoier C Feb. 3, 2018, 8:57 a.m. OK GNU C++11 TESTS 139 15 4505600 1500
35124528 hzy9819 C Feb. 10, 2018, 12:48 p.m. OK GNU C++11 TESTS 139 15 4915200 1500
35435103 nn020701 C Feb. 18, 2018, 3:05 a.m. OK GNU C++11 TESTS 139 30 4915200 1500
59901522 coolball C Sept. 2, 2019, 1:51 p.m. OK GNU C++11 TESTS 139 31 1024000 1500
62099944 vjudge5 C Oct. 8, 2019, 8:48 a.m. OK GNU C++11 TESTS 139 31 1843200 1500
50558520 07_2018 C Feb. 27, 2019, 9:28 a.m. OK GNU C++11 TESTS 139 31 1843200 1500
64205283 lx_zjk C Nov. 4, 2019, 12:42 p.m. OK GNU C++11 TESTS 139 31 2662400 1500
34986928 luogu_bot4 C Feb. 7, 2018, 3:17 a.m. OK GNU C++11 TESTS 139 31 3072000 1500
62112630 12345231345 C Oct. 8, 2019, 12:35 p.m. OK GNU C++11 TESTS 139 31 3276800 1500
34924944 Georeth C Feb. 4, 2018, 3:17 p.m. OK GNU C++11 TESTS 139 31 4198400 1500
35059546 zhishuashuiti C Feb. 8, 2018, 1:16 p.m. OK GNU C++14 TESTS 139 46 2867200 1500
35175670 vjudge4 C Feb. 12, 2018, 11:07 a.m. OK GNU C++14 TESTS 139 46 2867200 1500
36199398 teitoku C March 11, 2018, 12:32 p.m. OK GNU C++14 TESTS 139 46 2867200 1500
35123188 kinssang C Feb. 10, 2018, 12:03 p.m. OK GNU C++14 TESTS 139 46 2867200 1500
34937464 kangzzz C Feb. 5, 2018, 8:02 a.m. OK GNU C++14 TESTS 139 46 2867200 1500
34878221 xiaolongbao C Feb. 2, 2018, 11:19 p.m. OK GNU C++14 TESTS 139 46 3686400 1500
34880835 liu397688551 C Feb. 3, 2018, 3:08 a.m. OK GNU C++14 TESTS 139 46 3686400 1500
34911411 AlecSandra C Feb. 4, 2018, 12:50 a.m. OK GNU C++14 TESTS 139 46 3891200 1500
36044746 562225807 C March 7, 2018, 12:50 p.m. OK GNU C++14 TESTS 139 46 4608000 1500
36037285 562225807 C March 7, 2018, 8:32 a.m. OK GNU C++14 TESTS 139 46 4608000 1500
51028523 vjudge5 C March 8, 2019, 12:34 p.m. OK GNU C++17 TESTS 139 62 1024000 1500
44178347 visanr C Oct. 12, 2018, 9:58 a.m. OK GNU C++17 TESTS 139 62 1228800 1500
67438402 run_time_terror C Dec. 22, 2019, 6:11 p.m. OK GNU C++17 TESTS 139 62 1228800 1500
67392960 golikovnik C Dec. 21, 2019, 8:47 p.m. OK GNU C++17 TESTS 139 62 1228800 1500
65278220 Mukhitali C Nov. 18, 2019, 3:29 a.m. OK GNU C++17 TESTS 139 62 1228800 1500
60579065 rishiraj22 C Sept. 14, 2019, 5:42 p.m. OK GNU C++17 TESTS 139 62 1228800 1500
59869562 Magda21 C Sept. 1, 2019, 6:42 p.m. OK GNU C++17 TESTS 139 62 1228800 1500
45064482 Wandoka C Oct. 29, 2018, 4:24 p.m. OK GNU C++17 TESTS 139 62 1228800 1500
57140406 Raiden C July 16, 2019, 10:46 a.m. OK GNU C++17 TESTS 139 62 1638400 1500
61433827 7amasa C Sept. 28, 2019, 3:46 p.m. OK GNU C++17 TESTS 139 62 1638400 1500
34881723 sl0th C Feb. 3, 2018, 4:04 a.m. OK Haskell TESTS 139 108 73830400 1500
35148020 codemania C Feb. 11, 2018, 9:41 a.m. OK Haskell TESTS 139 873 105984000 1500
67675726 CodAR C Dec. 27, 2019, 1:22 a.m. OK Java 11 TESTS 139 421 0 1500
66476027 bluesky111 C Dec. 7, 2019, 8:51 p.m. OK Java 8 TESTS 139 124 0 1500
53495844 prituladima C April 29, 2019, 11:43 a.m. OK Java 8 TESTS 139 124 0 1500
52256811 mTvTm C April 3, 2019, 6:18 a.m. OK Java 8 TESTS 139 124 0 1500
35331839 parth_15 C Feb. 16, 2018, 9:15 a.m. OK Java 8 TESTS 139 124 20684800 1500
35104745 In_The_Name_Of_Love C Feb. 9, 2018, 8:18 p.m. OK Java 8 TESTS 139 124 20684800 1500
52555526 manish_98 C April 10, 2019, 7:32 a.m. OK Java 8 TESTS 139 139 0 1500
49216971 sooraj10 C Jan. 30, 2019, 5:31 p.m. OK Java 8 TESTS 139 139 0 1500
34982857 java_geek C Feb. 6, 2018, 9:07 p.m. OK Java 8 TESTS 139 139 20787200 1500
34898404 mathmaniac C Feb. 3, 2018, 4:13 p.m. OK Java 8 TESTS 139 139 21094400 1500
52556032 manish_98 C April 10, 2019, 7:49 a.m. OK Java 8 TESTS 139 140 0 1500
64615201 Spheniscine C Nov. 10, 2019, 4:24 a.m. OK Kotlin TESTS 139 171 3788800 1500
47788168 bubnov C Dec. 31, 2018, 11:52 a.m. OK Kotlin TESTS 139 186 4096000 1500
34881418 ZALeo C Feb. 3, 2018, 3:43 a.m. OK Kotlin TESTS 139 373 46284800 1500
37749134 og.kostya C April 30, 2018, 1:28 p.m. OK Mono C# TESTS 139 62 9523200 1500
61317481 Peter111 C Sept. 26, 2019, 11:34 a.m. OK Mono C# TESTS 139 124 19456000 1500
51649861 nemars C March 21, 2019, 6:23 p.m. OK Mono C# TESTS 139 139 23142400 1500
34868048 turmezzz C Feb. 2, 2018, 4:33 p.m. OK MS C# TESTS 139 93 25190400 1500
35072462 Chernyshov C Feb. 8, 2018, 9:07 p.m. OK MS C# TESTS 139 109 25292800 1500
34935950 fr0st C Feb. 5, 2018, 6:51 a.m. OK MS C# TESTS 139 124 32153600 1500
34863998 tattosha_aptan C Feb. 2, 2018, 4:13 p.m. OK MS C# TESTS 139 171 21401600 1500
35331559 kostyanf14 C Feb. 16, 2018, 9:03 a.m. OK MS C# TESTS 139 202 32563200 1500
34942906 vjudge2 C Feb. 5, 2018, 12:01 p.m. OK MS C++ TESTS 139 46 3072000 1500
34942951 vjudge2 C Feb. 5, 2018, 12:02 p.m. OK MS C++ TESTS 139 46 3072000 1500
35137402 miagkov C Feb. 10, 2018, 8:59 p.m. OK MS C++ TESTS 139 46 3481600 1500
34871172 rkm0959 C Feb. 2, 2018, 5:23 p.m. OK MS C++ TESTS 139 46 3584000 1500
34864932 SleepZzz C Feb. 2, 2018, 4:18 p.m. OK MS C++ TESTS 139 46 3891200 1500
37985302 scorpiowf C May 7, 2018, 5:03 a.m. OK MS C++ TESTS 139 46 4812800 1500
34969669 vjudge2 C Feb. 6, 2018, 12:11 p.m. OK MS C++ TESTS 139 46 10752000 1500
34969642 vjudge4 C Feb. 6, 2018, 12:10 p.m. OK MS C++ TESTS 139 46 10752000 1500
34992219 RCG C Feb. 7, 2018, 8:08 a.m. OK MS C++ TESTS 139 61 3891200 1500
34938131 vjudge2 C Feb. 5, 2018, 8:29 a.m. OK MS C++ TESTS 139 61 5427200 1500
63689733 EDawn C Oct. 29, 2019, 1:36 a.m. OK MS C++ 2017 TESTS 139 77 1843200 1500
64665923 wh2005 C Nov. 11, 2019, 2:12 a.m. OK MS C++ 2017 TESTS 139 78 2662400 1500
65030773 yuanyuan2048 C Nov. 15, 2019, 9:46 a.m. OK MS C++ 2017 TESTS 139 171 1638400 1500
55375164 Dragostan C June 9, 2019, 5:16 p.m. OK MS C++ 2017 TESTS 139 186 1843200 1500
36522861 Garfild63 C March 23, 2018, 7:05 a.m. OK PascalABC.NET TESTS 139 155 21196800 1500
62082920 mm944 C Oct. 7, 2019, 10:16 p.m. OK PascalABC.NET TESTS 139 482 4915200 1500
34871130 rsFalse C Feb. 2, 2018, 5:22 p.m. OK Perl TESTS 139 249 41369600 1500
34870881 rsFalse C Feb. 2, 2018, 5:15 p.m. OK Perl TESTS 139 280 41574400 1500
34908120 mayakin C Feb. 3, 2018, 8:27 p.m. OK PHP TESTS 139 373 81100800 1500
65574194 vjudge1 C Nov. 23, 2019, 8:50 a.m. OK PyPy 2 TESTS 139 171 12185600 1500
39397159 aeternalis1 C June 19, 2018, 3:31 a.m. OK PyPy 2 TESTS 139 187 18636800 1500
62061026 raj1307 C Oct. 7, 2019, 1:39 p.m. OK PyPy 2 TESTS 139 202 17305600 1500
48950513 dtl8 C Jan. 25, 2019, 11:10 p.m. OK PyPy 2 TESTS 139 217 12390400 1500
34875543 EON_KID C Feb. 2, 2018, 8:16 p.m. OK PyPy 2 TESTS 139 233 47411200 1500
34866149 inishchith. C Feb. 2, 2018, 4:25 p.m. OK PyPy 2 TESTS 139 234 47513600 1500
34881483 n1k2sh3112 C Feb. 3, 2018, 3:48 a.m. OK PyPy 2 TESTS 139 249 45977600 1500
34875517 EON_KID C Feb. 2, 2018, 8:15 p.m. OK PyPy 2 TESTS 139 264 48025600 1500
55929721 anshuman16423 C June 22, 2019, 10:53 a.m. OK PyPy 2 TESTS 139 280 39219200 1500
38683162 jooj C May 28, 2018, 2:55 a.m. OK PyPy 2 TESTS 139 327 27033600 1500
35196225 RagnarArdal C Feb. 13, 2018, 10:21 a.m. OK PyPy 3 TESTS 139 233 38195200 1500
48760757 toysheeyeyraku C Jan. 22, 2019, 4:55 p.m. OK PyPy 3 TESTS 139 249 18124800 1500
65597014 pfft C Nov. 23, 2019, 4:19 p.m. OK PyPy 3 TESTS 139 280 16691200 1500
46569115 mug C Dec. 4, 2018, 3:54 a.m. OK PyPy 3 TESTS 139 280 19660800 1500
58843146 romil797 C Aug. 15, 2019, 3:18 a.m. OK PyPy 3 TESTS 139 296 15564800 1500
62078501 irza_law C Oct. 7, 2019, 7:27 p.m. OK PyPy 3 TESTS 139 311 15564800 1500
61901064 UTMoonlight C Oct. 5, 2019, 8:35 a.m. OK PyPy 3 TESTS 139 326 18944000 1500
56489862 gaurav17050 C July 3, 2019, 8:51 p.m. OK PyPy 3 TESTS 139 327 17203200 1500
64457790 AvinashKartik C Nov. 7, 2019, 9:17 a.m. OK PyPy 3 TESTS 139 421 21606400 1500
57264361 artifexbm C July 18, 2019, 6:35 a.m. OK PyPy 3 TESTS 139 483 32256000 1500
34882964 brodo C Feb. 3, 2018, 5:25 a.m. OK Python 2 TESTS 139 233 16896000 1500
34954084 SoSooding C Feb. 5, 2018, 7:47 p.m. OK Python 2 TESTS 139 234 15667200 1500
35581320 rahulnagurtha C Feb. 22, 2018, 6:51 p.m. OK Python 2 TESTS 139 295 15667200 1500
34954115 tnowakow C Feb. 5, 2018, 7:49 p.m. OK Python 2 TESTS 139 295 15667200 1500
34935342 nealzane C Feb. 5, 2018, 6:22 a.m. OK Python 2 TESTS 139 327 15564800 1500
37084153 frmsaul C April 7, 2018, 11:23 p.m. OK Python 2 TESTS 139 436 17100800 1500
35152911 iit2014101 C Feb. 11, 2018, 12:35 p.m. OK Python 2 TESTS 139 436 19353600 1500
35442862 supachai_pay C Feb. 18, 2018, 10:22 a.m. OK Python 2 TESTS 139 467 22118400 1500
34937248 treasuryonly C Feb. 5, 2018, 7:52 a.m. OK Python 3 TESTS 139 202 19456000 1500
34936840 treasuryonly C Feb. 5, 2018, 7:31 a.m. OK Python 3 TESTS 139 217 19456000 1500
54022374 praveen.123 C May 12, 2019, 10:33 a.m. OK Python 3 TESTS 139 218 14131200 1500
62325584 sandro1999 C Oct. 10, 2019, 6:20 p.m. OK Python 3 TESTS 139 249 13721600 1500
51370241 ashok123 C March 16, 2019, 11:36 a.m. OK Python 3 TESTS 139 249 13824000 1500
35184307 ConnorWP1 C Feb. 12, 2018, 4:49 p.m. OK Python 3 TESTS 139 249 19353600 1500
34864948 Kowal1701 C Feb. 2, 2018, 4:18 p.m. OK Python 3 TESTS 139 249 19353600 1500
34864321 Tophski C Feb. 2, 2018, 4:15 p.m. OK Python 3 TESTS 139 249 19353600 1500
34937145 leopold_fc660m_pd C Feb. 5, 2018, 7:47 a.m. OK Python 3 TESTS 139 249 19456000 1500
35122172 chenyeyuan C Feb. 10, 2018, 11:30 a.m. OK Python 3 TESTS 139 249 20480000 1500

remove filters

Back to search problems