Codeforces Round 492 (Div. 1) [Thanks, uDebug!]

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
995 Codeforces Round 492 (Div. 1) [Thanks, uDebug!] FINISHED False 7200 201965099 June 24, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1264 ) F Cowmpany Cowmpensation PROGRAMMING combinatorics dp math trees 2700

B"Allen, having graduated from the MOO Institute of Techcowlogy (MIT), has started a startup! Allen is the president of his startup. He also hires n-1 other employees, each of which is assigned a direct superior. If u is a superior of v and v is a superior of w then also u is a superior of w . Additionally, there are no u and v such that u is the superior of v and v is the superior of u . Allen himself has no superior. Allen is employee number 1 , and the others are employee numbers 2 through n . Finally, Allen must assign salaries to each employee in the company including himself. Due to budget constraints, each employee's salary is an integer between 1 and D . Additionally, no employee can make strictly more than his superior. Help Allen find the number of ways to assign salaries. As this number may be large, output it modulo 10^9 + 7 . The first line of the input contains two integers n and D ( 1 <= n <= 3000 , 1 <= D <= 10^9 ). The remaining n-1 lines each contain a single positive integer, where the i -th line contains the integer p_i ( 1 <= p_i <= i ). p_i denotes the direct superior of employee i+1 . Output a single integer: the number of ways to assign salaries modulo 10^9 + 7 . In the first sample case, employee 2 and 3 report directly to Allen. The three salaries, in order, can be (1,1,1) , (2,1,1) , (2,1,2) , (2,2,1) or (2,2,2) . In the second sample case, employee 2 reports to Allen and employee 3 reports to employee 2. In order, the possible salaries are (1,1,1) , (2,1,1) , (2,2,1) , (2,2,2) , (3,1,1) , (3,2,1) , (3,2,2) , (3,3,1) , (3,3,2) , (3,3,3) . "...

Tutorials

Editorial for Codeforces Round #492 [Thanks u-Debug!]

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
69503942 hos.lyric F Jan. 25, 2020, 7:44 a.m. OK D TESTS 67 452 52736000 2700
40968720 luogu_bot3 F July 30, 2018, 12:30 p.m. OK GNU C++ TESTS 67 140 36966400 2700
40968460 yybyyb F July 30, 2018, 12:25 p.m. OK GNU C++ TESTS 67 140 36966400 2700
40912948 juruorg F July 29, 2018, 9:55 a.m. OK GNU C++ TESTS 67 155 72908800 2700
40911578 GuessYCB F July 29, 2018, 9:08 a.m. OK GNU C++ TESTS 67 156 77619200 2700
40088323 vjudge1 F July 8, 2018, 2:54 p.m. OK GNU C++ TESTS 67 187 72704000 2700
39670846 Worldwide_D F June 26, 2018, 9:08 a.m. OK GNU C++ TESTS 67 218 36659200 2700
41075381 mayaohua2003 F Aug. 1, 2018, 7:48 a.m. OK GNU C++ TESTS 67 218 72601600 2700
40545017 Notseefire F July 19, 2018, 11:09 a.m. OK GNU C++ TESTS 67 248 145100800 2700
39976060 zjo_2001 F July 5, 2018, 7:14 a.m. OK GNU C++ TESTS 67 311 36761600 2700
39869426 DZYO F July 2, 2018, 1:22 p.m. OK GNU C++ TESTS 67 327 75059200 2700
44632355 Re_xy F Oct. 21, 2018, 8:45 a.m. OK GNU C++11 TESTS 67 93 36147200 2700
68645014 Rubbish12345 F Jan. 12, 2020, 8:46 a.m. OK GNU C++11 TESTS 67 93 36556800 2700
51213580 da32s1da F March 12, 2019, 9:15 a.m. OK GNU C++11 TESTS 67 93 37376000 2700
42349575 Feeey F Sept. 2, 2018, 3:34 a.m. OK GNU C++11 TESTS 67 109 36864000 2700
39648545 rxdoi F June 25, 2018, 11:57 a.m. OK GNU C++11 TESTS 67 109 36864000 2700
39618994 jhn333 F June 24, 2018, 5:21 p.m. OK GNU C++11 TESTS 67 109 36864000 2700
59843927 hjsjhn F Sept. 1, 2019, 8:38 a.m. OK GNU C++11 TESTS 67 109 72806400 2700
64434462 luogu_bot5 F Nov. 7, 2019, 12:10 a.m. OK GNU C++11 TESTS 67 124 36249600 2700
49083470 water_mi F Jan. 28, 2019, 6:48 a.m. OK GNU C++11 TESTS 67 124 36249600 2700
49126982 water_mi F Jan. 29, 2019, 12:26 a.m. OK GNU C++11 TESTS 67 124 36352000 2700
40931736 ReaLNero1 F July 30, 2018, 1:16 a.m. OK GNU C++14 TESTS 67 108 36556800 2700
40903825 shdut F July 29, 2018, 3:42 a.m. OK GNU C++14 TESTS 67 108 36556800 2700
65467529 vjudge2 F Nov. 21, 2019, 6:50 a.m. OK GNU C++14 TESTS 67 108 40448000 2700
39670361 consecutivelimit F June 26, 2018, 8:48 a.m. OK GNU C++14 TESTS 67 109 36352000 2700
40977385 ReaLNero1 F July 30, 2018, 4:10 p.m. OK GNU C++14 TESTS 67 109 36556800 2700
39730425 MegaOwIer F June 28, 2018, 1:42 a.m. OK GNU C++14 TESTS 67 109 36659200 2700
44920541 haneulz F Oct. 26, 2018, 5:40 p.m. OK GNU C++14 TESTS 67 109 36761600 2700
39710862 Marco_L_T F June 27, 2018, 3:13 p.m. OK GNU C++14 TESTS 67 124 36352000 2700
50095176 Stump F Feb. 18, 2019, 12:24 p.m. OK GNU C++14 TESTS 67 124 36556800 2700
65468884 vjudge4 F Nov. 21, 2019, 7:30 a.m. OK GNU C++14 TESTS 67 124 36761600 2700
57448840 square1001 F July 21, 2019, 9:03 a.m. OK GNU C++17 TESTS 67 109 55808000 2700
55830425 jiangly F June 20, 2019, 12:53 p.m. OK GNU C++17 TESTS 67 124 36659200 2700
58848435 realSpongeBob F Aug. 15, 2019, 6:28 a.m. OK GNU C++17 TESTS 67 124 36761600 2700
45083574 tfg F Oct. 30, 2018, 5:33 a.m. OK GNU C++17 TESTS 67 124 37683200 2700
39796121 Infinite_Stars F June 30, 2018, 11:33 a.m. OK GNU C++17 TESTS 67 124 72704000 2700
56806872 pipipipipi43 F July 10, 2019, 2:15 p.m. OK GNU C++17 TESTS 67 124 73113600 2700
57441395 vjudge4 F July 21, 2019, 6:51 a.m. OK GNU C++17 TESTS 67 139 55808000 2700
39618704 Arterm F June 24, 2018, 5:19 p.m. OK GNU C++17 TESTS 67 139 103526400 2700
42011275 lintoto F Aug. 24, 2018, 1:12 a.m. OK GNU C++17 TESTS 67 140 41779200 2700
40430190 Twishkle.Aevdark F July 16, 2018, 3:27 p.m. OK GNU C++17 TESTS 67 140 72806400 2700
39621536 Lewin F June 24, 2018, 5:39 p.m. OK Java 8 TESTS 67 483 77312000 2700
39679093 Tom--CCS F June 26, 2018, 3:03 p.m. OK Java 8 TESTS 67 592 83251200 2700
39660905 kessido F June 25, 2018, 10:15 p.m. OK Java 8 TESTS 67 592 144076800 2700
39631930 qwerty787788 F June 24, 2018, 8:57 p.m. OK Java 8 TESTS 67 639 38400000 2700
50213123 tri F Feb. 20, 2019, 2:06 a.m. OK Java 8 TESTS 67 701 135884800 2700
39624808 Petr F June 24, 2018, 6:05 p.m. OK Java 8 TESTS 67 779 39219200 2700
39683237 Intrincantation F June 26, 2018, 6:06 p.m. OK Java 8 TESTS 67 857 82739200 2700
41336500 U_Square F Aug. 8, 2018, 12:25 p.m. OK Java 8 TESTS 67 966 257228800 2700
39736979 fetetriste F June 28, 2018, 8:33 a.m. OK Java 8 TESTS 67 997 81817600 2700
39723756 fetetriste F June 27, 2018, 5:32 p.m. OK Java 8 TESTS 67 997 134758400 2700
39622378 RAVEman F June 24, 2018, 5:46 p.m. OK MS C++ TESTS 67 810 133939200 2700

remove filters

Back to search problems