Codeforces Global Round 15

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
1552 Codeforces Global Round 15 FINISHED False 9900 110129111 July 25, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 539 ) G A Serious Referee PROGRAMMING bitmasks brute force dfs and similar sortings

B'Andrea has come up with what he believes to be a novel sorting algorithm for arrays of length n . The algorithm works as follows. Initially there is an array of n integers a_1, , a_2, , ... , , a_n . Then, k steps are executed. For each 1 <= i <= k , during the i -th step the subsequence of the array a with indexes j_{i,1}< j_{i,2}< ... < j_{i, q_i} is sorted, without changing the values with the remaining indexes. So, the subsequence a_{j_{i,1}}, , a_{j_{i,2}}, , ... , , a_{j_{i,q_i}} is sorted and all other elements of a are left untouched. Andrea, being eager to share his discovery with the academic community, sent a short paper describing his algorithm to the journal "Annals of Sorting Algorithms" and you are the referee of the paper (that is, the person who must judge the correctness of the paper). You must decide whether Andrea 's algorithm is correct, that is, if it sorts any array a of n integers. The first line contains two integers n and k ( 1 <= n <= 40 , 0 <= k <= 10 ) -- the length of the arrays handled by Andrea 's algorithm and the number of steps of Andrea 's algorithm. Then k lines follow, each describing the subsequence considered in a step of Andrea 's algorithm. The i -th of these lines contains the integer q_i ( 1 <= q_i <= n ) followed by q_i integers j_{i,1}, ,j_{i,2}, , ... , , j_{i,q_i} ( 1 <= j_{i,1}<j_{i,2}< cdots<j_{i,q_i} <= n ) -- the length of the subsequence considered in the i -th step and the indexes of the subsequence. If Andrea 's algorithm is correct print ACCEPTED, otherwise print REJECTED. Explanation of the first sample: The algorithm consists of 3 steps. The first one sorts the subsequence [a_1, a_2, a_3] , the second one sorts the subsequence [a_2, a_3, a_4] , the third one sorts the subsequence [a_1,a_2] . For example, if initially a=[6, 5, 6, 3] , the algorit'...

Tutorials

Editorial of Global Round 15

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
123780146 duality G July 25, 2021, 9:13 p.m. OK GNU C++11 TESTS 75 93 3891200
123778530 yao11617 G July 25, 2021, 8:29 p.m. OK GNU C++11 TESTS 73 155 37478400
123780002 duality G July 25, 2021, 9:08 p.m. OK GNU C++11 TESTS 75 312 3891200
123786738 yzc2005 G July 26, 2021, 1:11 a.m. OK GNU C++11 TESTS 75 920 3891200
123767279 I_love_chtholly G July 25, 2021, 5:19 p.m. OK GNU C++11 TESTS 71 920 3891200
123762362 krismaz G July 25, 2021, 5:01 p.m. OK GNU C++14 TESTS 71 93 3891200
123785681 BSBandme G July 26, 2021, 12:37 a.m. OK GNU C++14 TESTS 75 171 85299200
123761274 voover G July 25, 2021, 4:57 p.m. OK GNU C++14 TESTS 71 327 23859200
123795911 shb123 G July 26, 2021, 4:27 a.m. OK GNU C++14 TESTS 75 624 3891200
123765856 scli_weapon G July 25, 2021, 5:15 p.m. OK GNU C++14 TESTS 71 639 3891200
123753523 Subconscious G July 25, 2021, 4:24 p.m. OK GNU C++14 TESTS 71 639 3891200
123758051 shb123 G July 25, 2021, 4:43 p.m. OK GNU C++14 TESTS 71 685 3891200
123766384 LiciaDu G July 25, 2021, 5:16 p.m. OK GNU C++14 TESTS 71 702 3788800
123774107 Radewoosh G July 25, 2021, 7:01 p.m. OK GNU C++14 TESTS 71 732 3993600
123777856 scli_weapon G July 25, 2021, 8:14 p.m. OK GNU C++14 TESTS 72 780 3891200
123771322 cip999 G July 25, 2021, 6:19 p.m. OK GNU C++17 TESTS 71 77 3788800
123769276 skywalkert G July 25, 2021, 6 p.m. OK GNU C++17 TESTS 71 78 4198400
123783488 jeroenodb G July 25, 2021, 11:06 p.m. OK GNU C++17 TESTS 75 93 3788800
123780316 krijgertje G July 25, 2021, 9:18 p.m. OK GNU C++17 TESTS 75 124 3891200
123797599 sd0061 G July 26, 2021, 5 a.m. OK GNU C++17 TESTS 76 140 3891200
123777801 Xellos G July 25, 2021, 8:13 p.m. OK GNU C++17 TESTS 72 140 33484800
123771508 icecuber G July 25, 2021, 6:22 p.m. OK GNU C++17 TESTS 71 280 3891200
123766256 Torta G July 25, 2021, 5:16 p.m. OK GNU C++17 TESTS 71 358 27545600
123785963 yhx-12243 G July 26, 2021, 12:47 a.m. OK GNU C++17 TESTS 75 390 3788800
123794630 Nson G July 26, 2021, 4:02 a.m. OK GNU C++17 TESTS 75 546 3788800
123759037 kotatsugame G July 25, 2021, 4:47 p.m. OK GNU C++17 (64) TESTS 71 61 4300800
123761030 simonlindholm G July 25, 2021, 4:56 p.m. OK GNU C++17 (64) TESTS 71 61 4403200
123760594 tfg G July 25, 2021, 4:54 p.m. OK GNU C++17 (64) TESTS 71 62 4300800
123756911 mango_lassi G July 25, 2021, 4:38 p.m. OK GNU C++17 (64) TESTS 71 62 4300800
123779718 Ronnie007 G July 25, 2021, 9 p.m. OK GNU C++17 (64) TESTS 75 77 4300800
123765354 natsugiri G July 25, 2021, 5:13 p.m. OK GNU C++17 (64) TESTS 71 77 19660800
123787444 1-gon G July 26, 2021, 1:30 a.m. OK GNU C++17 (64) TESTS 75 93 4300800
123776831 elbrunovsky G July 25, 2021, 7:52 p.m. OK GNU C++17 (64) TESTS 71 108 4300800
123763693 nocriz G July 25, 2021, 5:07 p.m. OK GNU C++17 (64) TESTS 71 109 4300800
123794410 Roundgod G July 26, 2021, 3:58 a.m. OK GNU C++17 (64) TESTS 75 156 4403200
123781521 clyring G July 25, 2021, 9:55 p.m. OK Haskell TESTS 75 811 11673600
123777712 clyring G July 25, 2021, 8:10 p.m. OK Haskell TESTS 72 920 11673600
123790426 dalt G July 26, 2021, 2:39 a.m. OK Java 11 TESTS 75 280 25395200
123790535 dalt G July 26, 2021, 2:41 a.m. OK Java 11 TESTS 75 327 25395200
123800569 sansen G July 26, 2021, 5:50 a.m. OK Rust TESTS 77 93 3788800
123800283 sansen G July 26, 2021, 5:45 a.m. OK Rust TESTS 77 93 3788800
123755124 qwerty787788 G July 25, 2021, 4:31 p.m. OK Rust TESTS 71 109 3788800
123762000 sansen G July 25, 2021, 5 p.m. OK Rust TESTS 71 155 17203200
123794491 sansen G July 26, 2021, 3:59 a.m. OK Rust TESTS 75 171 140800000
123793813 sansen G July 26, 2021, 3:46 a.m. OK Rust TESTS 75 686 143564800

remove filters

Back to search problems