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 |
---|---|---|---|---|---|---|
1172 | Codeforces Round 564 (Div. 1) | FINISHED | False | 7200 | 177530087 | June 7, 2019, 12:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 5010 ) | A | Nauuo and Cards | PROGRAMMING | greedy implementation | 1800 |
B"Nauuo is a girl who loves playing cards. One day she was playing cards but found that the cards were mixed with some empty ones. There are n cards numbered from 1 to n , and they were mixed with another n empty cards. She piled up the 2n cards and drew n of them. The n cards in Nauuo's hands are given. The remaining n cards in the pile are also given in the order from top to bottom. In one operation she can choose a card in her hands and play it -- put it at the bottom of the pile, then draw the top card from the pile. Nauuo wants to make the n numbered cards piled up in increasing order (the i -th card in the pile from top to bottom is the card i ) as quickly as possible. Can you tell her the minimum number of operations? The first line contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of numbered cards. The second line contains n integers a_1,a_2, ldots,a_n ( 0 <= a_i <= n ) -- the initial cards in Nauuo's hands. 0 represents an empty card. The third line contains n integers b_1,b_2, ldots,b_n ( 0 <= b_i <= n ) -- the initial cards in the pile, given in order from top to bottom. 0 represents an empty card. It is guaranteed that each number from 1 to n appears exactly once, either in a_{1..n} or b_{1..n} . The output contains a single integer -- the minimum number of operations to make the n numbered cards piled up in increasing order. Example 1 We can play the card 2 and draw the card 3 in the first operation. After that, we have [0,3,0] in hands and the cards in the pile are [0,1,2] from top to bottom. Then, we play the card 3 in the second operation. The cards in the pile are [1,2,3] , in which the cards are piled up in increasing order. Example 2 Play an empty card and draw the card 1 , then play 1 , 2 , 3 in order. "... |
Codeforces Round #564 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
55304325 | bzEq | A | June 8, 2019, 1:29 p.m. | OK | Clang++17 Diagnostics | TESTS | 111 | 155 | 1945600 | 1800 | |
55259966 | hos.lyric | A | June 7, 2019, 1:16 p.m. | OK | D | TESTS | 111 | 93 | 11571200 | 1800 | |
55254035 | Gassa | A | June 7, 2019, 12:38 p.m. | OK | D | TESTS | 111 | 93 | 14950400 | 1800 | |
55296121 | ananaygupta70 | A | June 8, 2019, 9:57 a.m. | OK | GNU C11 | TESTS | 111 | 78 | 2355200 | 1800 | |
60376130 | qq125ZZsb | A | Sept. 11, 2019, 6:39 a.m. | OK | GNU C++11 | TESTS | 111 | 31 | 819200 | 1800 | |
55333858 | ouqingliang | A | June 9, 2019, 12:34 p.m. | OK | GNU C++11 | TESTS | 111 | 31 | 819200 | 1800 | |
55300769 | The_Crossing | A | June 8, 2019, 11:56 a.m. | OK | GNU C++11 | TESTS | 111 | 31 | 819200 | 1800 | |
55286229 | luogu_bot1 | A | June 8, 2019, 5:05 a.m. | OK | GNU C++11 | TESTS | 111 | 31 | 1536000 | 1800 | |
56058961 | _violet | A | June 26, 2019, 3:40 a.m. | OK | GNU C++11 | TESTS | 111 | 31 | 1638400 | 1800 | |
60347083 | wuhan2005 | A | Sept. 10, 2019, 12:58 p.m. | OK | GNU C++11 | TESTS | 111 | 31 | 1638400 | 1800 | |
58979635 | ZredXNy | A | Aug. 18, 2019, 3:28 a.m. | OK | GNU C++11 | TESTS | 111 | 31 | 1638400 | 1800 | |
55383917 | DennyQi | A | June 10, 2019, 12:31 a.m. | OK | GNU C++11 | TESTS | 111 | 31 | 2252800 | 1800 | |
55305013 | luogu_bot3 | A | June 8, 2019, 1:55 p.m. | OK | GNU C++11 | TESTS | 111 | 31 | 2252800 | 1800 | |
57120037 | luogu_bot2 | A | July 16, 2019, midnight | OK | GNU C++11 | TESTS | 111 | 31 | 2252800 | 1800 | |
55740760 | wjyyy | A | June 19, 2019, 7:16 a.m. | OK | GNU C++14 | TESTS | 111 | 46 | 4505600 | 1800 | |
55254777 | naoya_t | A | June 7, 2019, 12:42 p.m. | OK | GNU C++14 | TESTS | 111 | 46 | 15257600 | 1800 | |
55577428 | jeffzz | A | June 15, 2019, 3:04 a.m. | OK | GNU C++14 | TESTS | 111 | 78 | 1638400 | 1800 | |
55251844 | TonySnark | A | June 7, 2019, 12:29 p.m. | OK | GNU C++14 | TESTS | 111 | 78 | 1638400 | 1800 | |
56462995 | bbssgg11 | A | July 3, 2019, 7:40 a.m. | OK | GNU C++14 | TESTS | 111 | 78 | 1740800 | 1800 | |
55249763 | natsugiri | A | June 7, 2019, 12:21 p.m. | OK | GNU C++14 | TESTS | 111 | 78 | 2457600 | 1800 | |
58947248 | rhrnald | A | Aug. 17, 2019, 9:33 a.m. | OK | GNU C++14 | TESTS | 111 | 78 | 12083200 | 1800 | |
57270015 | Libitina | A | July 18, 2019, 8:34 a.m. | OK | GNU C++14 | TESTS | 111 | 93 | 819200 | 1800 | |
55293953 | China_1 | A | June 8, 2019, 9:01 a.m. | OK | GNU C++14 | TESTS | 111 | 93 | 819200 | 1800 | |
57281865 | beginend | A | July 18, 2019, 1:04 p.m. | OK | GNU C++14 | TESTS | 111 | 93 | 1638400 | 1800 | |
55282426 | whzzt | A | June 8, 2019, 2:18 a.m. | OK | GNU C++17 | TESTS | 111 | 46 | 5836800 | 1800 | |
55250960 | interestingLSY | A | June 7, 2019, 12:25 p.m. | OK | GNU C++17 | TESTS | 111 | 46 | 14745600 | 1800 | |
58173807 | rareone0602 | A | Aug. 2, 2019, 12:20 p.m. | OK | GNU C++17 | TESTS | 111 | 77 | 3686400 | 1800 | |
56191134 | EvolveZ | A | June 28, 2019, 7:40 a.m. | OK | GNU C++17 | TESTS | 111 | 78 | 1536000 | 1800 | |
55269658 | mohamedeltair | A | June 7, 2019, 3:52 p.m. | OK | GNU C++17 | TESTS | 111 | 78 | 1843200 | 1800 | |
55269331 | mohamedeltair | A | June 7, 2019, 3:45 p.m. | OK | GNU C++17 | TESTS | 111 | 78 | 2662400 | 1800 | |
57147222 | ivandr | A | July 16, 2019, 1:24 p.m. | OK | GNU C++17 | TESTS | 111 | 93 | 0 | 1800 | |
55475142 | abraham14 | A | June 11, 2019, 10:21 p.m. | OK | GNU C++17 | TESTS | 111 | 93 | 1843200 | 1800 | |
61795236 | INVWVZ | A | Oct. 3, 2019, 5:02 p.m. | OK | GNU C++17 | TESTS | 111 | 93 | 2048000 | 1800 | |
55249761 | RCG | A | June 7, 2019, 12:21 p.m. | OK | GNU C++17 | TESTS | 111 | 93 | 2355200 | 1800 | |
55251718 | uwi | A | June 7, 2019, 12:28 p.m. | OK | Java 8 | TESTS | 111 | 140 | 0 | 1800 | |
55250834 | Egor | A | June 7, 2019, 12:25 p.m. | OK | Java 8 | TESTS | 111 | 140 | 0 | 1800 | |
55253614 | dalt | A | June 7, 2019, 12:36 p.m. | OK | Java 8 | TESTS | 111 | 155 | 0 | 1800 | |
56525066 | LAKOUAM_IMAD | A | July 4, 2019, 4:46 p.m. | OK | Java 8 | TESTS | 111 | 171 | 2867200 | 1800 | |
55296591 | Noureldin | A | June 8, 2019, 10:08 a.m. | OK | Java 8 | TESTS | 111 | 171 | 4915200 | 1800 | |
56357799 | vjvjain0 | A | June 30, 2019, 5:51 p.m. | OK | Java 8 | TESTS | 111 | 171 | 4915200 | 1800 | |
55249844 | Taran_1407 | A | June 7, 2019, 12:22 p.m. | OK | Java 8 | TESTS | 111 | 187 | 6246400 | 1800 | |
60504583 | yaoct | A | Sept. 13, 2019, 8:37 p.m. | OK | Java 8 | TESTS | 111 | 202 | 4915200 | 1800 | |
56638217 | AkshajK | A | July 6, 2019, 9:48 p.m. | OK | Java 8 | TESTS | 111 | 202 | 7577600 | 1800 | |
56524439 | ISSAM_LAKOUAM | A | July 4, 2019, 4:29 p.m. | OK | Java 8 | TESTS | 111 | 217 | 10035200 | 1800 | |
55260507 | elizarov | A | June 7, 2019, 1:20 p.m. | OK | Kotlin | TESTS | 111 | 296 | 6451200 | 1800 | |
55251457 | ymatsux | A | June 7, 2019, 12:27 p.m. | OK | Kotlin | TESTS | 111 | 326 | 7475200 | 1800 | |
55255521 | riantkb | A | June 7, 2019, 12:46 p.m. | OK | Mono C# | TESTS | 111 | 139 | 34406400 | 1800 | |
55260655 | keymoon | A | June 7, 2019, 1:21 p.m. | OK | Mono C# | TESTS | 111 | 187 | 37376000 | 1800 | |
58621760 | TianZuiXing | A | Aug. 11, 2019, 4:07 p.m. | OK | MS C++ | TESTS | 111 | 78 | 819200 | 1800 | |
58647245 | TianPingXing | A | Aug. 12, 2019, 6:16 a.m. | OK | MS C++ | TESTS | 111 | 78 | 2457600 | 1800 | |
58362006 | vjudge3 | A | Aug. 6, 2019, 1:24 a.m. | OK | MS C++ | TESTS | 111 | 78 | 2457600 | 1800 | |
58652231 | TianJianXing | A | Aug. 12, 2019, 7:54 a.m. | OK | MS C++ | TESTS | 111 | 78 | 2457600 | 1800 | |
60466806 | vjudge4 | A | Sept. 13, 2019, 2:22 a.m. | OK | MS C++ | TESTS | 111 | 78 | 2457600 | 1800 | |
60419559 | vjudge1 | A | Sept. 12, 2019, 5:05 a.m. | OK | MS C++ | TESTS | 111 | 78 | 3174400 | 1800 | |
58714209 | TianJianXing | A | Aug. 13, 2019, 1:26 p.m. | OK | MS C++ | TESTS | 111 | 93 | 2457600 | 1800 | |
60420170 | vjudge3 | A | Sept. 12, 2019, 5:27 a.m. | OK | MS C++ | TESTS | 111 | 93 | 3174400 | 1800 | |
57289044 | hunggggg | A | July 18, 2019, 3:49 p.m. | OK | MS C++ 2017 | TESTS | 111 | 280 | 1740800 | 1800 | |
57286714 | hunggggg | A | July 18, 2019, 2:55 p.m. | OK | MS C++ 2017 | TESTS | 111 | 280 | 1740800 | 1800 | |
55249481 | kotamanegi | A | June 7, 2019, 12:21 p.m. | OK | MS C++ 2017 | TESTS | 111 | 311 | 4300800 | 1800 | |
55269661 | pajenegod | A | June 7, 2019, 3:52 p.m. | OK | PyPy 2 | TESTS | 111 | 186 | 10752000 | 1800 | |
55262451 | alexwice | A | June 7, 2019, 1:34 p.m. | OK | PyPy 2 | TESTS | 111 | 841 | 25702400 | 1800 | |
59885774 | yumtam | A | Sept. 2, 2019, 7:52 a.m. | OK | PyPy 3 | TESTS | 111 | 312 | 18329600 | 1800 | |
55684710 | sdhd | A | June 17, 2019, 2:52 p.m. | OK | PyPy 3 | TESTS | 111 | 312 | 18841600 | 1800 | |
55460106 | Bovniova | A | June 11, 2019, 2:54 p.m. | OK | PyPy 3 | TESTS | 111 | 312 | 24268800 | 1800 | |
66603134 | mihir_yadav | A | Dec. 10, 2019, 5:20 p.m. | OK | PyPy 3 | TESTS | 111 | 342 | 22732800 | 1800 | |
55255122 | Kiri8128 | A | June 7, 2019, 12:44 p.m. | OK | PyPy 3 | TESTS | 111 | 343 | 22016000 | 1800 | |
59613224 | Mr.Inconsistent | A | Aug. 28, 2019, 11:42 a.m. | OK | PyPy 3 | TESTS | 111 | 421 | 21606400 | 1800 | |
55252690 | iehn | A | June 7, 2019, 12:32 p.m. | OK | PyPy 3 | TESTS | 111 | 1107 | 44851200 | 1800 | |
57807998 | Helli.code | A | July 26, 2019, 3:57 p.m. | OK | Python 2 | TESTS | 111 | 405 | 11980800 | 1800 | |
58937707 | soumyasarkar1998 | A | Aug. 17, 2019, 5:24 a.m. | OK | Python 2 | TESTS | 111 | 483 | 11878400 | 1800 | |
55311477 | Limeni | A | June 8, 2019, 5:54 p.m. | OK | Python 3 | TESTS | 111 | 358 | 15974400 | 1800 | |
55422127 | codershuvo | A | June 11, 2019, 7:04 a.m. | OK | Python 3 | TESTS | 111 | 358 | 18739200 | 1800 | |
59446757 | tushartyagi8750 | A | Aug. 25, 2019, 1:40 p.m. | OK | Python 3 | TESTS | 111 | 373 | 15974400 | 1800 | |
55422039 | codershuvo | A | June 11, 2019, 7:01 a.m. | OK | Python 3 | TESTS | 111 | 373 | 18739200 | 1800 | |
55311450 | Limeni | A | June 8, 2019, 5:53 p.m. | OK | Python 3 | TESTS | 111 | 374 | 15974400 | 1800 | |
55277002 | whatshisbucket | A | June 7, 2019, 7:52 p.m. | OK | Python 3 | TESTS | 111 | 436 | 19353600 | 1800 | |
55726409 | nexus.chebykin | A | June 18, 2019, 6 p.m. | OK | Python 3 | TESTS | 111 | 467 | 19660800 | 1800 | |
67506414 | gearjack | A | Dec. 24, 2019, 7:27 a.m. | OK | Rust | TESTS | 111 | 46 | 4710400 | 1800 | |
55268232 | EbTech | A | June 7, 2019, 3:26 p.m. | OK | Rust | TESTS | 111 | 46 | 4812800 | 1800 |
Back to search problems