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 |
---|---|---|---|---|---|---|
438 | Codeforces Round 250 (Div. 1) | FINISHED | False | 7200 | 335984404 | June 1, 2014, 1 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1913 ) | E | The Child and Binary Tree | PROGRAMMING | combinatorics divide and conquer fft number theory | 3100 |
B"Our child likes computer science very much, especially he likes binary trees. Consider the sequence of n distinct positive integers: c1, xe2 x80 x89c2, xe2 x80 x89..., xe2 x80 x89cn. The child calls a vertex-weighted rooted binary tree good if and only if for every vertex v, the weight of v is in the set {c1, xe2 x80 x89c2, xe2 x80 x89..., xe2 x80 x89cn}. Also our child thinks that the weight of a vertex-weighted tree is the sum of all vertices' weights. Given an integer m, can you for all s (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89s xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m) calculate the number of good vertex-weighted rooted binary trees with weight s? Please, check the samples for better understanding what trees are considered different. We only want to know the answer modulo 998244353 (7 xe2 x80 x89 xc3 x97 xe2 x80 x8917 xe2 x80 x89 xc3 x97 xe2 x80 x89223 xe2 x80 x89+ xe2 x80 x891, a prime number). The first line contains two integers n, xe2 x80 x89m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105; 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). The second line contains n space-separated pairwise distinct integers c1, xe2 x80 x89c2, xe2 x80 x89..., xe2 x80 x89cn. (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ci xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). Print m lines, each line containing a single integer. The i-th line must contain the number of good vertex-weighted rooted binary trees whose weight exactly equal to i. Print the answers modulo 998244353 (7 xe2 x80 x89 xc3 x97 xe2 x80 x8917 xe2 x80 x89 xc3 x97 xe2 x80 x89223 xe2 x80 x89+ xe2 x80 x891, a prime number). In the first example, there are 9 good vertex-weighted rooted binary trees whose weight exactly equal to 3:"... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
24407949 | ShinFeb | E | Feb. 3, 2017, 10:54 a.m. | OK | GNU C++ | TESTS | 22 | 685 | 20992000 | 3100 | |
27158618 | songyiqun | E | May 16, 2017, 12:03 p.m. | OK | GNU C++ | TESTS | 22 | 702 | 8499200 | 3100 | |
33470414 | Cydiater | E | Dec. 21, 2017, 4:49 a.m. | OK | GNU C++ | TESTS | 22 | 748 | 14131200 | 3100 | |
25954679 | Leefir | E | March 30, 2017, 1:55 p.m. | OK | GNU C++ | TESTS | 22 | 748 | 46592000 | 3100 | |
31791365 | Flash-boy | E | Oct. 27, 2017, 10:20 a.m. | OK | GNU C++ | TESTS | 22 | 763 | 25600000 | 3100 | |
37122901 | luogu_bot2 | E | April 9, 2018, 1:19 p.m. | OK | GNU C++ | TESTS | 22 | 779 | 12902400 | 3100 | |
28128455 | sdfzyhx | E | June 29, 2017, 12:20 a.m. | OK | GNU C++ | TESTS | 22 | 795 | 29900800 | 3100 | |
28121800 | sdfzyhx | E | June 28, 2017, 1:56 p.m. | OK | GNU C++ | TESTS | 22 | 795 | 29900800 | 3100 | |
10033681 | JOHNKRAM | E | Feb. 26, 2015, 2:39 p.m. | OK | GNU C++ | TESTS | 22 | 811 | 16793600 | 3100 | |
10033584 | JOHNKRAM | E | Feb. 26, 2015, 2:32 p.m. | OK | GNU C++ | TESTS | 22 | 826 | 16793600 | 3100 | |
8175902 | zhj | E | Oct. 11, 2014, 3:11 p.m. | OK | GNU C++0x | TESTS | 22 | 1185 | 30515200 | 3100 | |
8172645 | zhj | E | Oct. 11, 2014, 8:42 a.m. | OK | GNU C++0x | TESTS | 22 | 2105 | 31539200 | 3100 | |
6783586 | Fdg | E | June 2, 2014, 6:05 p.m. | OK | GNU C++0x | TESTS | 22 | 2137 | 6451200 | 3100 | |
8176731 | hadrori | E | Oct. 11, 2014, 5:14 p.m. | OK | GNU C++0x | TESTS | 22 | 2230 | 7884800 | 3100 | |
6938790 | hadrori | E | June 21, 2014, 5:04 p.m. | OK | GNU C++0x | TESTS | 22 | 2246 | 7680000 | 3100 | |
10094716 | l1n4r | E | March 1, 2015, 10:36 a.m. | OK | GNU C++0x | TESTS | 22 | 2262 | 7782400 | 3100 | |
6938775 | hadrori | E | June 21, 2014, 5 p.m. | OK | GNU C++0x | TESTS | 22 | 2324 | 7680000 | 3100 | |
6938747 | hadrori | E | June 21, 2014, 4:53 p.m. | OK | GNU C++0x | TESTS | 22 | 2432 | 14848000 | 3100 | |
6938726 | hadrori | E | June 21, 2014, 4:48 p.m. | OK | GNU C++0x | TESTS | 22 | 3322 | 14745600 | 3100 | |
6938708 | hadrori | E | June 21, 2014, 4:45 p.m. | OK | GNU C++0x | TESTS | 22 | 3447 | 14438400 | 3100 | |
48934623 | HolyK | E | Jan. 25, 2019, 1:41 p.m. | OK | GNU C++11 | TESTS | 22 | 311 | 26316800 | 3100 | |
59970710 | liqing | E | Sept. 4, 2019, 12:47 a.m. | OK | GNU C++11 | TESTS | 22 | 327 | 12697600 | 3100 | |
50341203 | dtcxzyw | E | Feb. 23, 2019, 2:25 a.m. | OK | GNU C++11 | TESTS | 22 | 327 | 13926400 | 3100 | |
44285443 | ez_zh | E | Oct. 14, 2018, 7:13 a.m. | OK | GNU C++11 | TESTS | 22 | 468 | 20480000 | 3100 | |
49848291 | luogu_bot1 | E | Feb. 13, 2019, 12:36 a.m. | OK | GNU C++11 | TESTS | 22 | 483 | 9011200 | 3100 | |
51059542 | luogu_bot2 | E | March 9, 2019, 2 a.m. | OK | GNU C++11 | TESTS | 22 | 514 | 20275200 | 3100 | |
53871645 | luogu_bot2 | E | May 8, 2019, 9:24 a.m. | OK | GNU C++11 | TESTS | 22 | 530 | 20275200 | 3100 | |
47489321 | Minamoto | E | Dec. 25, 2018, 11:07 a.m. | OK | GNU C++11 | TESTS | 22 | 530 | 20275200 | 3100 | |
50057971 | memset0c | E | Feb. 17, 2019, 11:19 a.m. | OK | GNU C++11 | TESTS | 22 | 530 | 60108800 | 3100 | |
54982032 | LJZ_C | E | June 2, 2019, 1:40 p.m. | OK | GNU C++11 | TESTS | 22 | 546 | 12185600 | 3100 | |
46685750 | TLE | E | Dec. 6, 2018, 1:57 p.m. | OK | GNU C++14 | TESTS | 22 | 264 | 29696000 | 3100 | |
46685865 | TLE | E | Dec. 6, 2018, 1:59 p.m. | OK | GNU C++14 | TESTS | 22 | 265 | 29696000 | 3100 | |
46685192 | TLE | E | Dec. 6, 2018, 1:43 p.m. | OK | GNU C++14 | TESTS | 22 | 280 | 28672000 | 3100 | |
46683828 | TLE | E | Dec. 6, 2018, 1:10 p.m. | OK | GNU C++14 | TESTS | 22 | 498 | 28672000 | 3100 | |
49954616 | nickluo | E | Feb. 15, 2019, 3:28 p.m. | OK | GNU C++14 | TESTS | 22 | 499 | 23449600 | 3100 | |
66307901 | CDEGA | E | Dec. 5, 2019, 10:13 a.m. | OK | GNU C++14 | TESTS | 22 | 514 | 9318400 | 3100 | |
48043980 | tourist | E | Jan. 6, 2019, 11:07 p.m. | OK | GNU C++14 | TESTS | 22 | 530 | 8499200 | 3100 | |
48070028 | tourist | E | Jan. 7, 2019, 9:24 p.m. | OK | GNU C++14 | TESTS | 22 | 530 | 9318400 | 3100 | |
50238297 | _Sakits | E | Feb. 20, 2019, 11:50 a.m. | OK | GNU C++14 | TESTS | 22 | 546 | 8396800 | 3100 | |
53079422 | zhouzhendong | E | April 21, 2019, 5:22 a.m. | OK | GNU C++14 | TESTS | 22 | 561 | 36966400 | 3100 | |
58522850 | Elegia | E | Aug. 10, 2019, 5:47 a.m. | OK | GNU C++17 | TESTS | 22 | 264 | 6246400 | 3100 | |
50243219 | Trisolaris | E | Feb. 20, 2019, 1:48 p.m. | OK | GNU C++17 | TESTS | 22 | 390 | 8499200 | 3100 | |
46852901 | Trisolaris | E | Dec. 10, 2018, 1:13 p.m. | OK | GNU C++17 | TESTS | 22 | 452 | 7680000 | 3100 | |
46851965 | Trisolaris | E | Dec. 10, 2018, 12:45 p.m. | OK | GNU C++17 | TESTS | 22 | 467 | 7680000 | 3100 | |
49862441 | luogu_bot3 | E | Feb. 13, 2019, 10:17 a.m. | OK | GNU C++17 | TESTS | 22 | 483 | 9011200 | 3100 | |
49848247 | Dance_Of_Faith | E | Feb. 13, 2019, 12:33 a.m. | OK | GNU C++17 | TESTS | 22 | 483 | 9011200 | 3100 | |
50914395 | Elegia | E | March 7, 2019, 5:13 a.m. | OK | GNU C++17 | TESTS | 22 | 499 | 6246400 | 3100 | |
49055335 | InvUsr | E | Jan. 27, 2019, 1:03 p.m. | OK | GNU C++17 | TESTS | 22 | 499 | 10752000 | 3100 | |
48167577 | Elegia | E | Jan. 10, 2019, 3:22 a.m. | OK | GNU C++17 | TESTS | 22 | 514 | 6246400 | 3100 | |
48167932 | Elegia | E | Jan. 10, 2019, 3:44 a.m. | OK | GNU C++17 | TESTS | 22 | 514 | 6553600 | 3100 | |
6787718 | dnk | E | June 3, 2014, 1:44 p.m. | OK | Java 6 | TESTS | 22 | 3837 | 3276800 | 3100 | |
11759336 | q234rty | E | June 25, 2015, 11:13 a.m. | OK | Java 7 | TESTS | 22 | 3649 | 10956800 | 3100 | |
6785570 | ftiasch | E | June 3, 2014, 6:53 a.m. | OK | Java 7 | TESTS | 22 | 3712 | 11468800 | 3100 | |
6787723 | dnk | E | June 3, 2014, 1:45 p.m. | OK | Java 7 | TESTS | 22 | 3790 | 3379200 | 3100 | |
6863336 | winger | E | June 11, 2014, 9:35 a.m. | OK | Java 8 | TESTS | 22 | 1715 | 1126400 | 3100 | |
6787726 | dnk | E | June 3, 2014, 1:45 p.m. | OK | Java 8 | TESTS | 22 | 2371 | 1536000 | 3100 | |
6774697 | Egor | E | June 1, 2014, 3:52 p.m. | OK | Java 8 | TESTS | 22 | 6895 | 1433600 | 3100 | |
6775994 | Snowcool | E | June 1, 2014, 6:15 p.m. | OK | Java 8 | TESTS | 22 | 6941 | 1536000 | 3100 | |
6783580 | Fdg | E | June 2, 2014, 6:04 p.m. | OK | MS C++ | TESTS | 22 | 3025 | 6451200 | 3100 |
Back to search problems