Codeforces Round 637 (Div. 1) - Thanks, Ivan Belonogov!

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
1340 Codeforces Round 637 (Div. 1) - Thanks, Ivan Belonogov! FINISHED False 9000 149699711 April 23, 2020, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13455 ) A Nastya and Strange Generator PROGRAMMING brute force data structures greedy implementation

B" Denis was very sad after Nastya rejected him. So he decided to walk through the gateways to have some fun. And luck smiled at him! When he entered the first courtyard, he met a strange man who was selling something. Denis bought a mysterious item and it was... Random permutation generator! Denis could not believed his luck. When he arrived home, he began to study how his generator works and learned the algorithm. The process of generating a permutation consists of n steps. At the i -th step, a place is chosen for the number i (1 <= q i <= q n) . The position for the number i is defined as follows: Let's have a look at the operation of the algorithm in the following example: Let n = 5 and the algorithm has already arranged the numbers 1, 2, 3 in the permutation. Consider how the generator will choose a position for the number 4 : Satisfied with his purchase, Denis went home. For several days without a break, he generated permutations. He believes that he can come up with random permutations no worse than a generator. After that, he wrote out the first permutation that came to mind p_1, p_2, ldots, p_n and decided to find out if it could be obtained as a result of the generator. Unfortunately, this task was too difficult for him, and he asked you for help. It is necessary to define whether the written permutation could be obtained using the described algorithm if the generator always selects the position Denis needs. The first line contains a single integer t (1 <= q t <= q 10^5) -- the number of test cases. Then the descriptions of the test cases follow. The first line of the test case contains a single integer n (1 <= q n <= q 10^5) -- the size of the permutation. The second line of the test case contains n different integers p_1, p_2, ldots, p_n ( 1 <= q p_i <= q n ) -- the permutation written by Denis. It is guaranteed that the sum of n over all "...

Tutorials

Codeforces Round #637 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
77791687 Gassa A April 23, 2020, 3:09 p.m. OK D TESTS 20 46 4198400
77787322 hos.lyric A April 23, 2020, 3:04 p.m. OK D TESTS 20 46 4198400
77886453 PimBin A April 24, 2020, 7:06 a.m. OK GNU C11 TESTS 21 31 409600
77811533 pengin_2000 A April 23, 2020, 3:40 p.m. OK GNU C11 TESTS 20 46 409600
77799642 cjtcalc A April 23, 2020, 3:20 p.m. OK GNU C++11 TESTS 20 30 204800
77784661 zhylj A April 23, 2020, 3:01 p.m. OK GNU C++11 TESTS 20 30 819200
77779664 lzqwq A April 23, 2020, 2:57 p.m. OK GNU C++11 TESTS 20 31 409600
77924925 vjudge1 A April 24, 2020, 2:48 p.m. OK GNU C++11 TESTS 21 31 409600
77881730 wasa855 A April 24, 2020, 6:11 a.m. OK GNU C++11 TESTS 21 31 409600
77806180 wygz A April 23, 2020, 3:30 p.m. OK GNU C++11 TESTS 20 31 512000
77785306 crasysky A April 23, 2020, 3:02 p.m. OK GNU C++11 TESTS 20 31 512000
77783529 zwj1 A April 23, 2020, 3 p.m. OK GNU C++11 TESTS 20 31 614400
77775852 FizzyDavid A April 23, 2020, 2:54 p.m. OK GNU C++11 TESTS 20 31 614400
77916025 Enderturtle A April 24, 2020, 1:35 p.m. OK GNU C++11 TESTS 21 31 819200
77784356 ransewhale A April 23, 2020, 3:01 p.m. OK GNU C++14 TESTS 20 31 0
77808873 tokitsukaze A April 23, 2020, 3:35 p.m. OK GNU C++14 TESTS 20 31 2560000
77820758 NotaMotuaQAQ A April 23, 2020, 3:58 p.m. OK GNU C++14 TESTS 20 31 4608000
77775267 danbanica A April 23, 2020, 2:53 p.m. OK GNU C++14 TESTS 20 46 204800
77878557 arolakiv A April 24, 2020, 5:32 a.m. OK GNU C++14 TESTS 21 46 409600
77867913 nandonathaniel A April 24, 2020, 2:40 a.m. OK GNU C++14 TESTS 21 46 409600
77865449 nasadigital A April 24, 2020, 1:41 a.m. OK GNU C++14 TESTS 21 46 409600
77986615 xuziling A April 25, 2020, 7:06 a.m. OK GNU C++14 TESTS 24 46 409600
77864236 monkey8 A April 24, 2020, 1:03 a.m. OK GNU C++14 TESTS 21 46 409600
77914464 Ric0chet A April 24, 2020, 1:22 p.m. OK GNU C++14 TESTS 21 46 409600
77774805 Unsterblicher_Geist A April 23, 2020, 2:53 p.m. OK GNU C++17 TESTS 20 30 2867200
77871485 liouzhou_101 A April 24, 2020, 3:45 a.m. OK GNU C++17 TESTS 21 30 5324800
77773773 LayCurse A April 23, 2020, 2:52 p.m. OK GNU C++17 TESTS 20 31 2969600
77771900 Swistakk A April 23, 2020, 2:50 p.m. OK GNU C++17 TESTS 20 46 0
77773332 gprano A April 23, 2020, 2:52 p.m. OK GNU C++17 TESTS 20 46 0
77777647 vishal4556 A April 23, 2020, 2:55 p.m. OK GNU C++17 TESTS 20 46 0
77776999 nitinjan06 A April 23, 2020, 2:54 p.m. OK GNU C++17 TESTS 20 46 0
77775377 peti1234 A April 23, 2020, 2:53 p.m. OK GNU C++17 TESTS 20 46 0
77938120 filippodigra A April 24, 2020, 4:48 p.m. OK GNU C++17 TESTS 21 46 409600
77961466 SoSooding A April 24, 2020, 10:27 p.m. OK GNU C++17 TESTS 22 46 409600
77771158 Egor A April 23, 2020, 2:50 p.m. OK GNU C++17 (64) TESTS 20 30 819200
78013195 rishabh1889 A April 25, 2020, 10:27 a.m. OK GNU C++17 (64) TESTS 24 31 0
77777410 risujiroh A April 23, 2020, 2:55 p.m. OK GNU C++17 (64) TESTS 20 31 409600
77906722 sharrad99 A April 24, 2020, 11:30 a.m. OK GNU C++17 (64) TESTS 21 31 409600
77869747 iefnah06 A April 24, 2020, 3:15 a.m. OK GNU C++17 (64) TESTS 21 31 409600
77782251 ecnerwala A April 23, 2020, 2:59 p.m. OK GNU C++17 (64) TESTS 20 31 409600
77774199 yosupo A April 23, 2020, 2:52 p.m. OK GNU C++17 (64) TESTS 20 31 512000
77897468 dbs_mnnit A April 24, 2020, 9:17 a.m. OK GNU C++17 (64) TESTS 21 31 819200
77785783 haruki_K A April 23, 2020, 3:03 p.m. OK GNU C++17 (64) TESTS 20 31 819200
78009265 rky673 A April 25, 2020, 9:45 a.m. OK GNU C++17 (64) TESTS 24 31 819200
77776876 Lewin A April 23, 2020, 2:54 p.m. OK Java 11 TESTS 20 187 0
77777513 uwi A April 23, 2020, 2:55 p.m. OK Java 11 TESTS 20 217 0
77784545 TheSawan A April 23, 2020, 3:01 p.m. OK Java 11 TESTS 20 233 2867200
77788960 Tatsuyaaaa A April 23, 2020, 3:06 p.m. OK Java 11 TESTS 20 249 2969600
77784340 Dukkha A April 23, 2020, 3:01 p.m. OK Java 11 TESTS 20 311 0
77887011 neildahiya0 A April 24, 2020, 7:12 a.m. OK Java 11 TESTS 21 343 4915200
77998697 KhanhNguyenn A April 25, 2020, 8:41 a.m. OK Java 11 TESTS 24 358 4915200
77813897 SergeyMelnikov A April 23, 2020, 3:44 p.m. OK Java 8 TESTS 20 139 0
77801343 fetetriste A April 23, 2020, 3:23 p.m. OK Java 8 TESTS 20 139 0
77856996 qlf9 A April 23, 2020, 9:56 p.m. OK Java 8 TESTS 20 140 0
77798993 MagentaCobra A April 23, 2020, 3:19 p.m. OK Java 8 TESTS 20 140 0
77782460 DanielW48 A April 23, 2020, 2:59 p.m. OK Java 8 TESTS 20 140 0
77781110 YahiaSherif A April 23, 2020, 2:58 p.m. OK Java 8 TESTS 20 140 0
77777871 SecondThread A April 23, 2020, 2:55 p.m. OK Java 8 TESTS 20 140 0
77777056 ijxjdjd A April 23, 2020, 2:54 p.m. OK Java 8 TESTS 20 140 0
77852013 DarLam A April 23, 2020, 5:12 p.m. OK Java 8 TESTS 20 171 0
77788740 Taran_1407 A April 23, 2020, 3:06 p.m. OK Java 8 TESTS 20 171 2457600
77783155 koboshi A April 23, 2020, 3 p.m. OK Kotlin TESTS 20 218 7987200
77794964 darnley A April 23, 2020, 3:14 p.m. OK Kotlin TESTS 20 233 2662400
77781899 alexey.enkov A April 23, 2020, 2:59 p.m. OK Kotlin TESTS 20 249 3993600
77780225 Tlatoani A April 23, 2020, 2:57 p.m. OK Kotlin TESTS 20 280 0
77779066 keymoon A April 23, 2020, 2:56 p.m. OK Mono C# TESTS 20 124 11776000
77804928 mban259 A April 23, 2020, 3:28 p.m. OK Mono C# TESTS 20 140 13312000
77864884 camypaper A April 24, 2020, 1:22 a.m. OK Mono C# TESTS 21 218 110182400
77782222 lxhgww A April 23, 2020, 2:59 p.m. OK MS C++ TESTS 20 46 409600
77787244 r57shell A April 23, 2020, 3:04 p.m. OK MS C++ TESTS 20 109 7168000
77774222 pichulia A April 23, 2020, 2:52 p.m. OK MS C++ 2017 TESTS 20 46 2457600
77795942 danilgrig A April 23, 2020, 3:15 p.m. OK MS C++ 2017 TESTS 20 93 409600
77775659 kupriyanov A April 23, 2020, 2:53 p.m. OK MS C++ 2017 TESTS 20 109 819200
77789127 P___ A April 23, 2020, 3:06 p.m. OK MS C++ 2017 TESTS 20 124 7168000
77795710 tarattata1 A April 23, 2020, 3:15 p.m. OK MS C++ 2017 TESTS 20 155 7168000
77782978 MrLolthe1st A April 23, 2020, 3 p.m. OK MS C++ 2017 TESTS 20 155 8704000
77801796 pajenegod A April 23, 2020, 3:23 p.m. OK PyPy 2 TESTS 20 140 7475200
77783343 pa.n.ik A April 23, 2020, 3 p.m. OK PyPy 2 TESTS 20 186 8192000
77779925 sotanishy A April 23, 2020, 2:57 p.m. OK PyPy 3 TESTS 20 187 9932800
77771748 conqueror_of_tourist A April 23, 2020, 2:50 p.m. OK PyPy 3 TESTS 20 202 9318400
77795527 titia A April 23, 2020, 3:14 p.m. OK PyPy 3 TESTS 20 202 9728000
77782272 Jorke A April 23, 2020, 2:59 p.m. OK PyPy 3 TESTS 20 202 10240000
77776951 anagohirame A April 23, 2020, 2:54 p.m. OK PyPy 3 TESTS 20 202 10240000
77913248 Achilles221B A April 24, 2020, 1:10 p.m. OK PyPy 3 TESTS 21 202 10342400
78006427 jishnu19048 A April 25, 2020, 9:12 a.m. OK PyPy 3 TESTS 24 202 10342400
77913229 Achilles221B A April 24, 2020, 1:10 p.m. OK PyPy 3 TESTS 21 202 10342400
77880479 codershuvo A April 24, 2020, 5:56 a.m. OK PyPy 3 TESTS 21 202 10342400
77887323 KnightKnight A April 24, 2020, 7:16 a.m. OK PyPy 3 TESTS 21 202 10444800
77781801 nwi A April 23, 2020, 2:59 p.m. OK Python 2 TESTS 20 217 5324800
77965075 akshnde A April 25, 2020, 12:17 a.m. OK Python 2 TESTS 22 233 5427200
77876731 EkanshMahendru A April 24, 2020, 5:06 a.m. OK Python 3 TESTS 21 171 7372800
77784958 lyc12345 A April 23, 2020, 3:02 p.m. OK Python 3 TESTS 20 186 7168000
77779771 Cifko A April 23, 2020, 2:57 p.m. OK Python 3 TESTS 20 187 7577600
77893917 tushartyagi8750 A April 24, 2020, 8:35 a.m. OK Python 3 TESTS 21 233 7372800
77783199 sansen A April 23, 2020, 3 p.m. OK Rust TESTS 20 31 1536000
77787072 EbTech A April 23, 2020, 3:04 p.m. OK Rust TESTS 20 46 1536000
77799064 limed A April 23, 2020, 3:19 p.m. OK Scala TESTS 20 670 8499200

remove filters

Back to search problems