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 |
---|---|---|---|---|---|---|
1707 | Codeforces Round 808 (Div. 1) | FINISHED | False | 7200 | 79197863 | July 16, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 685 ) | D | Partial Virtual Trees | PROGRAMMING | combinatorics dp math trees |
B"Kawashiro Nitori is a girl who loves competitive programming. One day she found a rooted tree consisting of n vertices. The root is vertex 1 . As an advanced problem setter, she quickly thought of a problem. Kawashiro Nitori has a vertex set U= {1,2, ldots,n } . She's going to play a game with the tree and the set. In each operation, she will choose a vertex set T , where T is a partial virtual tree of U , and change U into T . A vertex set S_1 is a partial virtual tree of a vertex set S_2 , if S_1 is a subset of S_2 , S_1 neq S_2 , and for all pairs of vertices i and j in S_1 , operatorname{LCA}(i,j) is in S_1 , where operatorname{LCA}(x,y) denotes the lowest common ancestor of vertices x and y on the tree. Note that a vertex set can have many different partial virtual trees. Kawashiro Nitori wants to know for each possible k , if she performs the operation exactly k times, in how many ways she can make U= {1 } in the end? Two ways are considered different if there exists an integer z ( 1 <= z <= k ) such that after z operations the sets U are different. Since the answer could be very large, you need to find it modulo p . It's guaranteed that p is a prime number. The first line contains two integers n and p ( 2 <= n <= 2000 , 10^8 + 7 <= p <= 10^9+9 ). It's guaranteed that p is a prime number. Each of the next n-1 lines contains two integers u_i , v_i ( 1 <= q u_i, v_i <= q n ), representing an edge between u_i and v_i . It is guaranteed that the given edges form a tree. The only line contains n-1 integers -- the answer modulo p for k=1,2, ldots,n-1 . In the first test case, when k=1 , the only possible way is: When k=2 , there are 6 possible ways: When k=3 , there are 6 possible "... |
104930 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
164515400 | hos.lyric | D | July 16, 2022, 4:07 p.m. | OK | D | TESTS | 36 | 514 | 54579200 | ||
164575429 | devout | D | July 17, 2022, 5:44 a.m. | OK | GNU C++14 | TESTS | 36 | 186 | 64716800 | ||
164568711 | hydd | D | July 17, 2022, 3:57 a.m. | OK | GNU C++14 | TESTS | 36 | 187 | 106496000 | ||
164496478 | djq_cpp | D | July 16, 2022, 3:26 p.m. | OK | GNU C++14 | TESTS | 36 | 202 | 64921600 | ||
164571119 | wsyhb | D | July 17, 2022, 4:37 a.m. | OK | GNU C++14 | TESTS | 36 | 202 | 113254400 | ||
164535640 | Daas | D | July 16, 2022, 6:04 p.m. | OK | GNU C++14 | TESTS | 36 | 249 | 48844800 | ||
164511025 | ugly2333 | D | July 16, 2022, 3:56 p.m. | OK | GNU C++14 | TESTS | 36 | 249 | 119193600 | ||
164506638 | cnnfls_csy | D | July 16, 2022, 3:46 p.m. | OK | GNU C++14 | TESTS | 36 | 280 | 32665600 | ||
164561776 | ix35 | D | July 17, 2022, 2:15 a.m. | OK | GNU C++14 | TESTS | 36 | 280 | 32870400 | ||
164532419 | zhylj | D | July 16, 2022, 5:36 p.m. | OK | GNU C++14 | TESTS | 36 | 280 | 80998400 | ||
164562716 | Macesuted-Moe | D | July 17, 2022, 2:27 a.m. | OK | GNU C++14 | TESTS | 36 | 373 | 97280000 | ||
164567312 | kimoyami | D | July 17, 2022, 3:35 a.m. | OK | GNU C++17 | TESTS | 36 | 202 | 80384000 | ||
164554670 | chenxiaoyan | D | July 16, 2022, 11:51 p.m. | OK | GNU C++17 | TESTS | 36 | 249 | 65228800 | ||
164567043 | ButterCake | D | July 17, 2022, 3:31 a.m. | OK | GNU C++17 | TESTS | 36 | 342 | 64921600 | ||
164522608 | heno239 | D | July 16, 2022, 4:25 p.m. | OK | GNU C++17 | TESTS | 36 | 343 | 60006400 | ||
164510735 | catupper | D | July 16, 2022, 3:55 p.m. | OK | GNU C++17 | TESTS | 36 | 420 | 128716800 | ||
164489918 | kiwikiwi | D | July 16, 2022, 3:15 p.m. | OK | GNU C++17 | TESTS | 36 | 467 | 130048000 | ||
164556086 | xay5421 | D | July 17, 2022, 12:31 a.m. | OK | GNU C++17 (64) | TESTS | 36 | 109 | 64921600 | ||
164497571 | MeliodasIRA | D | July 16, 2022, 3:28 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 187 | 65024000 | ||
164559343 | basic_string | D | July 17, 2022, 1:36 a.m. | OK | GNU C++17 (64) | TESTS | 36 | 233 | 65126400 | ||
164521810 | Froggygua | D | July 16, 2022, 4:23 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 265 | 33075200 | ||
164566804 | Larry0101 | D | July 17, 2022, 3:27 a.m. | OK | GNU C++17 (64) | TESTS | 36 | 280 | 113766400 | ||
164532376 | _su1sen | D | July 16, 2022, 5:35 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 296 | 17817600 | ||
164518357 | AutumnKite | D | July 16, 2022, 4:14 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 296 | 34611200 | ||
164522926 | tzxydby | D | July 16, 2022, 4:26 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 342 | 32768000 | ||
164529607 | ynycoding | D | July 16, 2022, 5:16 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 343 | 32665600 | ||
164562755 | yuyue | D | July 17, 2022, 2:28 a.m. | OK | GNU C++17 (64) | TESTS | 36 | 343 | 131379200 | ||
164514325 | ecnerwala | D | July 16, 2022, 4:04 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 109 | 48537600 | ||
164541844 | maroonrk | D | July 16, 2022, 7:16 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 187 | 819200 | ||
164568626 | Fairy_Tale | D | July 17, 2022, 3:56 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 202 | 81100800 | ||
164518158 | Petr | D | July 16, 2022, 4:14 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 218 | 51200000 | ||
164571050 | MicroMaker | D | July 17, 2022, 4:36 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 233 | 17408000 | ||
164557344 | DerekFeng | D | July 17, 2022, 1:02 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 249 | 32665600 | ||
164506322 | 5002ryx | D | July 16, 2022, 3:46 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 249 | 48947200 | ||
164495095 | jiangly | D | July 16, 2022, 3:24 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 264 | 51814400 | ||
164513541 | Gary2005 | D | July 16, 2022, 4:02 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 296 | 97587200 | ||
164565686 | RiverHamster | D | July 17, 2022, 3:11 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 327 | 48742400 |
Back to search problems