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 |
---|---|---|---|---|---|---|
1889 | Codeforces Round 906 (Div. 1) | FINISHED | False | 9000 | 38676263 | Oct. 28, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 645 ) | D | Game of Stacks | PROGRAMMING | dfs and similar graphs implementation trees |
B"You have n stacks r_1,r_2, ldots,r_n . Each stack contains some positive integers ranging from 1 to n . Define the following functions: You want to know the values returned by texttt{init(1)}, texttt{init(2)}, ldots, texttt{init(n)} . Note that, during these calls, the stacks r_1,r_2, ldots,r_n don't change, so the calls texttt{init(1)}, texttt{init(2)}, ldots, texttt{init(n)} are independent. The first line of the input contains one integer n ( 1 <= n <= 10^5 ) -- the length of the array r . Each of the following n lines contains several integers. The first integer k_i ( 0 <= k_i <= 10^5 ) represents the number of elements in the i -th stack, and the following k_i positive integers c_{i,1},c_{i,2}, ldots,c_{i,k_i} ( 1 <= c_{i,j} <= n ) represent the elements in the i -th stack. c_{i,1} is the bottom element. In each test, sum k_i <= 10^6 . You need to output n values, the i -th of which is the value returned by texttt{init(i)} . In the first example: "... |
Codeforces Round 906 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
230281430 | antguz | D | Oct. 28, 2023, 7:29 p.m. | OK | GNU C++14 | TESTS | 29 | 326 | 20992000 | ||
230261798 | Muelsyse | D | Oct. 28, 2023, 5:02 p.m. | OK | GNU C++14 | TESTS | 28 | 343 | 5836800 | ||
230294000 | qiangbao | D | Oct. 28, 2023, 10:28 p.m. | OK | GNU C++14 | TESTS | 29 | 358 | 10956800 | ||
230251238 | shibohan | D | Oct. 28, 2023, 4:34 p.m. | OK | GNU C++14 | TESTS | 28 | 373 | 9523200 | ||
230258036 | 0wuming0 | D | Oct. 28, 2023, 4:53 p.m. | OK | GNU C++14 | TESTS | 28 | 405 | 8806400 | ||
230266564 | KroosTheKeenGlint | D | Oct. 28, 2023, 5:38 p.m. | OK | GNU C++14 | TESTS | 28 | 405 | 11878400 | ||
230243460 | ttklwxx | D | Oct. 28, 2023, 4:14 p.m. | OK | GNU C++14 | TESTS | 28 | 655 | 13209600 | ||
230267694 | crescent_yhw | D | Oct. 28, 2023, 5:44 p.m. | OK | GNU C++14 | TESTS | 28 | 982 | 15564800 | ||
230275935 | hos.lyric | D | Oct. 28, 2023, 6:40 p.m. | OK | GNU C++17 | TESTS | 29 | 202 | 8908800 | ||
230289852 | Victoriano012 | D | Oct. 28, 2023, 9:11 p.m. | OK | GNU C++17 | TESTS | 29 | 327 | 7782400 | ||
230287970 | Dominater069 | D | Oct. 28, 2023, 8:44 p.m. | OK | GNU C++17 | TESTS | 29 | 342 | 10444800 | ||
230283849 | sg0071729 | D | Oct. 28, 2023, 7:55 p.m. | OK | GNU C++17 | TESTS | 29 | 374 | 61849600 | ||
230261846 | Potassium | D | Oct. 28, 2023, 5:02 p.m. | OK | GNU C++17 | TESTS | 28 | 389 | 11059200 | ||
230293329 | candy34 | D | Oct. 28, 2023, 10:13 p.m. | OK | GNU C++17 | TESTS | 29 | 389 | 22835200 | ||
230231657 | Um_nik | D | Oct. 28, 2023, 3:48 p.m. | OK | GNU C++17 | TESTS | 28 | 390 | 8089600 | ||
230229252 | yutabi | D | Oct. 28, 2023, 3:43 p.m. | OK | GNU C++17 | TESTS | 28 | 405 | 8396800 | ||
230261749 | hos.lyric | D | Oct. 28, 2023, 5:02 p.m. | OK | GNU C++17 | TESTS | 28 | 420 | 11366400 | ||
230290060 | candy34 | D | Oct. 28, 2023, 9:14 p.m. | OK | GNU C++17 | TESTS | 29 | 420 | 22835200 | ||
230258816 | Rubikun | D | Oct. 28, 2023, 4:55 p.m. | OK | GNU C++17 (64) | TESTS | 28 | 296 | 27955200 | ||
230257175 | kotatsugame | D | Oct. 28, 2023, 4:50 p.m. | OK | GNU C++17 (64) | TESTS | 28 | 327 | 10956800 | ||
230308122 | Xellos | D | Oct. 29, 2023, 4:13 a.m. | OK | GNU C++17 (64) | TESTS | 29 | 327 | 13414400 | ||
230230795 | Geothermal | D | Oct. 28, 2023, 3:46 p.m. | OK | GNU C++17 (64) | TESTS | 28 | 342 | 9420800 | ||
230257017 | icecuber | D | Oct. 28, 2023, 4:50 p.m. | OK | GNU C++17 (64) | TESTS | 28 | 342 | 9932800 | ||
230254701 | K-H | D | Oct. 28, 2023, 4:44 p.m. | OK | GNU C++17 (64) | TESTS | 28 | 358 | 10035200 | ||
230249074 | PEIMUDA | D | Oct. 28, 2023, 4:28 p.m. | OK | GNU C++17 (64) | TESTS | 28 | 358 | 11264000 | ||
230236469 | 353cerega | D | Oct. 28, 2023, 3:58 p.m. | OK | GNU C++17 (64) | TESTS | 28 | 373 | 15769600 | ||
230271768 | Geothermal | D | Oct. 28, 2023, 6:10 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 373 | 45465600 | ||
230265826 | tute7627 | D | Oct. 28, 2023, 5:36 p.m. | OK | GNU C++17 (64) | TESTS | 28 | 404 | 18534400 | ||
230294318 | magnus.hegdahl | D | Oct. 28, 2023, 10:36 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 171 | 14233600 | ||
230235152 | maspy | D | Oct. 28, 2023, 3:55 p.m. | OK | GNU C++20 (64) | TESTS | 28 | 202 | 10649600 | ||
230293664 | magnus.hegdahl | D | Oct. 28, 2023, 10:20 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 202 | 14438400 | ||
230293700 | magnus.hegdahl | D | Oct. 28, 2023, 10:21 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 218 | 15462400 | ||
230293602 | magnus.hegdahl | D | Oct. 28, 2023, 10:19 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 218 | 23040000 | ||
230269607 | Misono_Mika | D | Oct. 28, 2023, 5:56 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 218 | 26931200 | ||
230265789 | neal | D | Oct. 28, 2023, 5:35 p.m. | OK | GNU C++20 (64) | TESTS | 28 | 234 | 10342400 | ||
230293650 | magnus.hegdahl | D | Oct. 28, 2023, 10:20 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 234 | 20070400 | ||
230270676 | zidder | D | Oct. 28, 2023, 6:03 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 249 | 9011200 | ||
230300905 | nguyenquocthinhhung | D | Oct. 29, 2023, 2:08 a.m. | OK | GNU C++20 (64) | TESTS | 29 | 249 | 9523200 | ||
230239737 | FastFreeTask | D | Oct. 28, 2023, 4:05 p.m. | OK | Kotlin 1.6 | TESTS | 28 | 780 | 34816000 | ||
230266885 | KroosTheKeenGlint | D | Oct. 28, 2023, 5:40 p.m. | OK | MS C++ 2017 | TESTS | 28 | 452 | 9523200 | ||
230267269 | chinerist | D | Oct. 28, 2023, 5:42 p.m. | OK | PyPy 3-64 | TESTS | 28 | 763 | 33689600 | ||
230258709 | sansen | D | Oct. 28, 2023, 4:54 p.m. | OK | Rust 2021 | TESTS | 28 | 249 | 29286400 |
Back to search problems