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 |
---|---|---|---|---|---|---|
917 | Codeforces Round 459 (Div. 1) | FINISHED | False | 7200 | 214586699 | Jan. 29, 2018, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1161 ) | D | Stranger Trees | PROGRAMMING | dp math matrices trees | 2600 |
B"Will shares a psychic connection with the Upside Down Monster, so everything the monster knows, Will knows. Suddenly, he started drawing, page after page, non-stop. Joyce, his mom, and Chief Hopper put the drawings together, and they realized, it's a labeled tree! A tree is a connected acyclic graph. Will's tree has n vertices. Joyce and Hopper don't know what that means, so they're investigating this tree and similar trees. For each k such that 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89- xe2 x80 x891, they're going to investigate all labeled trees with n vertices that share exactly k edges with Will's tree. Two labeled trees are different if and only if there's a pair of vertices (v, xe2 x80 x89u) such that there's an edge between v and u in one tree and not in the other one. Hopper and Joyce want to know how much work they have to do, so they asked you to tell them the number of labeled trees with n vertices that share exactly k edges with Will's tree, for each k. The answer could be very large, so they only asked you to tell them the answers modulo 1000000007 xe2 x80 x89= xe2 x80 x89109 xe2 x80 x89+ xe2 x80 x897. The first line of input contains a single integer n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the size of the tree. The next n xe2 x80 x89- xe2 x80 x891 lines contain the edges of Will's tree. Each line contains two integers v and u (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89v, xe2 x80 x89u xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, v xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89u), endpoints of an edge. It is guaranteed that the given graph is a tree. Print n integers in one line. i-th integer should be the number of the number of labeled trees with n vertices that share exactly i xe2 x80 x89- xe2 x80 x891 edges with Will's tree, modulo 1000 xe2 x80 x89000 xe2 x80 x89007 xe2 x80 x89= xe2 x80 x89109 xe2 x80 x89+ xe2 x80 x897. "... |
Codeforces Round #459 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
42111907 | luogu_bot5 | D | Aug. 26, 2018, 6:43 a.m. | OK | GNU C++ | TESTS | 34 | 31 | 204800 | 2600 | |
40907045 | JiangYutong | D | July 29, 2018, 6:28 a.m. | OK | GNU C++ | TESTS | 34 | 46 | 4710400 | 2600 | |
35809919 | Worldwide_D | D | March 1, 2018, 11:34 a.m. | OK | GNU C++ | TESTS | 34 | 46 | 6656000 | 2600 | |
36064706 | XingGeRuCi | D | March 8, 2018, 8:28 a.m. | OK | GNU C++ | TESTS | 34 | 46 | 12697600 | 2600 | |
37210125 | John_Cheng | D | April 11, 2018, 8:05 a.m. | OK | GNU C++ | TESTS | 34 | 46 | 37990400 | 2600 | |
37210309 | FairyHiweibolu | D | April 11, 2018, 8:12 a.m. | OK | GNU C++ | TESTS | 34 | 61 | 8499200 | 2600 | |
35966726 | beginend | D | March 5, 2018, 1:26 p.m. | OK | GNU C++ | TESTS | 34 | 62 | 6758400 | 2600 | |
34682428 | KrK | D | Jan. 29, 2018, 4:10 p.m. | OK | GNU C++ | TESTS | 34 | 78 | 6758400 | 2600 | |
37226196 | _patrick | D | April 11, 2018, 2:09 p.m. | OK | GNU C++ | TESTS | 34 | 78 | 8294400 | 2600 | |
35462756 | luogu_bot3 | D | Feb. 19, 2018, 5:52 a.m. | OK | GNU C++ | TESTS | 34 | 78 | 12697600 | 2600 | |
49861041 | Cyhlnj | D | Feb. 13, 2019, 9:30 a.m. | OK | GNU C++11 | TESTS | 34 | 31 | 0 | 2600 | |
49861019 | Cyhlnj | D | Feb. 13, 2019, 9:30 a.m. | OK | GNU C++11 | TESTS | 34 | 31 | 0 | 2600 | |
49860964 | Cyhlnj | D | Feb. 13, 2019, 9:28 a.m. | OK | GNU C++11 | TESTS | 34 | 31 | 0 | 2600 | |
55106157 | Pickupwin | D | June 5, 2019, 2:47 a.m. | OK | GNU C++11 | TESTS | 34 | 31 | 2969600 | 2600 | |
37112070 | laofudasuan | D | April 9, 2018, 2:22 a.m. | OK | GNU C++11 | TESTS | 34 | 31 | 7987200 | 2600 | |
37112058 | laofudasuan | D | April 9, 2018, 2:20 a.m. | OK | GNU C++11 | TESTS | 34 | 31 | 7987200 | 2600 | |
51321077 | RNS_JKS | D | March 15, 2019, 7:01 a.m. | OK | GNU C++11 | TESTS | 34 | 46 | 5427200 | 2600 | |
34688455 | JustN | D | Jan. 29, 2018, 7:11 p.m. | OK | GNU C++11 | TESTS | 34 | 46 | 6451200 | 2600 | |
34673182 | geniucos | D | Jan. 29, 2018, 3 p.m. | OK | GNU C++11 | TESTS | 34 | 46 | 7372800 | 2600 | |
55608997 | renjingyi | D | June 16, 2019, 4 a.m. | OK | GNU C++11 | TESTS | 34 | 46 | 9420800 | 2600 | |
59206440 | xgcxgc | D | Aug. 21, 2019, 7:05 a.m. | OK | GNU C++14 | TESTS | 34 | 30 | 204800 | 2600 | |
62389551 | melancholic_fat_otaku | D | Oct. 12, 2019, 12:23 a.m. | OK | GNU C++14 | TESTS | 34 | 31 | 204800 | 2600 | |
63417698 | Zory | D | Oct. 26, 2019, 5:07 a.m. | OK | GNU C++14 | TESTS | 34 | 31 | 614400 | 2600 | |
34680194 | ftiasch | D | Jan. 29, 2018, 3:50 p.m. | OK | GNU C++14 | TESTS | 34 | 31 | 3174400 | 2600 | |
37086325 | ftiasch | D | April 8, 2018, 3:21 a.m. | OK | GNU C++14 | TESTS | 34 | 31 | 3481600 | 2600 | |
59198754 | xgcxgc | D | Aug. 21, 2019, 3:17 a.m. | OK | GNU C++14 | TESTS | 34 | 31 | 4198400 | 2600 | |
40978494 | ReaLNero1 | D | July 30, 2018, 4:40 p.m. | OK | GNU C++14 | TESTS | 34 | 31 | 5632000 | 2600 | |
34681680 | KADR | D | Jan. 29, 2018, 4:03 p.m. | OK | GNU C++14 | TESTS | 34 | 31 | 5939200 | 2600 | |
34692108 | krijgertje | D | Jan. 29, 2018, 10:46 p.m. | OK | GNU C++14 | TESTS | 34 | 31 | 6144000 | 2600 | |
35196131 | sazzadrume | D | Feb. 13, 2018, 10:16 a.m. | OK | GNU C++14 | TESTS | 34 | 31 | 7372800 | 2600 | |
62358695 | xgcxgc | D | Oct. 11, 2019, 11:46 a.m. | OK | GNU C++17 | TESTS | 34 | 31 | 204800 | 2600 | |
53817807 | E869120 | D | May 6, 2019, 11:35 a.m. | OK | GNU C++17 | TESTS | 34 | 31 | 20992000 | 2600 | |
69545109 | vjudge1 | D | Jan. 26, 2020, 1:42 a.m. | OK | GNU C++17 | TESTS | 34 | 46 | 4198400 | 2600 | |
60840718 | kefaa2 | D | Sept. 19, 2019, 10:50 a.m. | OK | GNU C++17 | TESTS | 34 | 46 | 4915200 | 2600 | |
69417190 | user202729_ | D | Jan. 23, 2020, 1:25 p.m. | OK | GNU C++17 | TESTS | 34 | 62 | 1843200 | 2600 | |
69591121 | vjudge5 | D | Jan. 26, 2020, 11:38 p.m. | OK | GNU C++17 | TESTS | 34 | 62 | 6963200 | 2600 | |
42326080 | lixinyue | D | Sept. 1, 2018, 5:38 a.m. | OK | GNU C++17 | TESTS | 34 | 93 | 5836800 | 2600 | |
46749779 | Slaaava | D | Dec. 8, 2018, 8:38 a.m. | OK | GNU C++17 | TESTS | 34 | 109 | 9625600 | 2600 | |
39044633 | zbtrs | D | June 8, 2018, 11:40 a.m. | OK | GNU C++17 | TESTS | 34 | 109 | 20480000 | 2600 | |
39044511 | zbtrs | D | June 8, 2018, 11:35 a.m. | OK | GNU C++17 | TESTS | 34 | 124 | 74342400 | 2600 | |
34778586 | mathmaniac | D | Jan. 31, 2018, 6:54 p.m. | OK | Java 8 | TESTS | 34 | 811 | 27852800 | 2600 | |
34778509 | mathmaniac | D | Jan. 31, 2018, 6:52 p.m. | OK | Java 8 | TESTS | 34 | 811 | 27852800 | 2600 | |
34679337 | Lewin | D | Jan. 29, 2018, 3:42 p.m. | OK | Java 8 | TESTS | 34 | 997 | 20787200 | 2600 |
Back to search problems