Educational Codeforces Round 40 (Rated for Div. 2)

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
954 Educational Codeforces Round 40 (Rated for Div. 2) FINISHED False 10800 215826924 March 22, 2018, 6:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 607 ) H Path Counting PROGRAMMING combinatorics dp 2500

B"You are given a rooted tree. Let's denote d(x) as depth of node x: depth of the root is 1, depth of any other node x is d(y) xe2 x80 x89+ xe2 x80 x891, where y is a parent of x. The tree has the following property: every node x with d(x) xe2 x80 x89= xe2 x80 x89i has exactly ai children. Maximum possible depth of a node is n, and an xe2 x80 x89= xe2 x80 x890. We define fk as the number of unordered pairs of vertices in the tree such that the number of edges on the simple path between them is equal to k. Calculate fk modulo 109 xe2 x80 x89+ xe2 x80 x897 for every 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892n xe2 x80 x89- xe2 x80 x892. The first line of input contains an integer n (2 xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89n xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x895 xe2 x80 x89000) -- the maximum depth of a node. The second line of input contains n xe2 x80 x89- xe2 x80 x891 integers a1, xe2 x80 x89 xe2 x80 x89a2, xe2 x80 x89 xe2 x80 x89..., xe2 x80 x89 xe2 x80 x89an xe2 x80 x89- xe2 x80 x891 (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89ai xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109), where ai is the number of children of every node x such that d(x) xe2 x80 x89= xe2 x80 x89i. Since an xe2 x80 x89= xe2 x80 x890, it is not given in the input. Print 2n xe2 x80 x89- xe2 x80 x892 numbers. The k-th of these numbers must be equal to fk modulo 109 xe2 x80 x89+ xe2 x80 x897. This the tree from the first sample: "...

Tutorials

58519

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
36531050 tswdfop157 H March 23, 2018, 1 p.m. OK GNU C++ TESTS 20 841 104038400 2500
36521039 KENNYPARK H March 23, 2018, 5:31 a.m. OK GNU C++ TESTS 20 858 4096000 2500
36576618 beginend H March 24, 2018, 2 p.m. OK GNU C++ TESTS 20 1091 204390400 2500
36517299 KrK H March 22, 2018, 11:28 p.m. OK GNU C++ TESTS 20 1201 3686400 2500
36490810 nootwu H March 22, 2018, 8:32 a.m. OK GNU C++ TESTS 20 1232 104448000 2500
36697482 Samaritan123 H March 28, 2018, 3:28 p.m. OK GNU C++ TESTS 20 1263 246579200 2500
36492641 lagin H March 22, 2018, 8:49 a.m. OK GNU C++ TESTS 20 1279 4300800 2500
36495032 nhho H March 22, 2018, 9:12 a.m. OK GNU C++ TESTS 20 1403 5632000 2500
36787591 JameC H April 1, 2018, 4:02 a.m. OK GNU C++ TESTS 20 1419 3686400 2500
36519335 chenyanbo H March 23, 2018, 3:20 a.m. OK GNU C++ TESTS 20 1466 204390400 2500
67975583 rainboy H Dec. 30, 2019, 4:46 p.m. OK GNU C11 TESTS 20 2371 200499200 2500
36497380 kczno1 H March 22, 2018, 10:22 a.m. OK GNU C++11 TESTS 20 468 3788800 2500
57740564 py_ultron H July 25, 2019, 11:20 a.m. OK GNU C++11 TESTS 20 623 200704000 2500
57870136 lopare H July 28, 2019, 1:01 a.m. OK GNU C++11 TESTS 20 623 200704000 2500
66482009 AnnieCai H Dec. 8, 2019, 3:40 a.m. OK GNU C++11 TESTS 20 670 102400 2500
46173515 yclrz H Nov. 24, 2018, 1:58 p.m. OK GNU C++11 TESTS 20 717 200908800 2500
47862522 SylvanasS H Jan. 3, 2019, 7:17 a.m. OK GNU C++11 TESTS 20 764 201318400 2500
37164389 rushcheyo H April 10, 2018, 3:39 p.m. OK GNU C++11 TESTS 20 764 204185600 2500
36710811 egoist H March 29, 2018, 6:38 a.m. OK GNU C++11 TESTS 20 795 104345600 2500
50383854 vjudge1 H Feb. 23, 2019, 12:11 p.m. OK GNU C++11 TESTS 20 795 200908800 2500
36520646 theprof H March 23, 2018, 5:04 a.m. OK GNU C++11 TESTS 20 826 3788800 2500
36526973 I_AM_CHTHOLLY H March 23, 2018, 10:04 a.m. OK GNU C++14 TESTS 20 561 3481600 2500
36522780 The_Unbeatable H March 23, 2018, 7:01 a.m. OK GNU C++14 TESTS 20 561 3788800 2500
68075336 yan-zp H Jan. 2, 2020, 12:15 p.m. OK GNU C++14 TESTS 20 670 204492800 2500
58819344 betrue12 H Aug. 14, 2019, 1:34 p.m. OK GNU C++14 TESTS 20 702 512000 2500
48697356 RobeZH H Jan. 21, 2019, 11:40 p.m. OK GNU C++14 TESTS 20 717 201011200 2500
36532490 CuriousCat.hzw H March 23, 2018, 1:49 p.m. OK GNU C++14 TESTS 20 764 103833600 2500
63986940 idxcalcal H Nov. 1, 2019, 12:01 p.m. OK GNU C++14 TESTS 20 764 201113600 2500
36520899 satanic0 H March 23, 2018, 5:22 a.m. OK GNU C++14 TESTS 20 779 3481600 2500
44830381 pr3pony H Oct. 25, 2018, 8:11 a.m. OK GNU C++14 TESTS 20 780 204800 2500
36521142 satanic0 H March 23, 2018, 5:38 a.m. OK GNU C++14 TESTS 20 826 3481600 2500
40932635 ReaLNero1 H July 30, 2018, 1:55 a.m. OK GNU C++17 TESTS 20 312 102400 2500
36944121 Ignatz H April 4, 2018, 8:48 a.m. OK GNU C++17 TESTS 20 312 3481600 2500
55978251 Medeowex H June 23, 2019, 6:55 p.m. OK GNU C++17 TESTS 20 358 50585600 2500
48309152 chinmay0906 H Jan. 12, 2019, 10:41 p.m. OK GNU C++17 TESTS 20 670 512000 2500
60515633 FlowerOfSorrow H Sept. 14, 2019, 6:25 a.m. OK GNU C++17 TESTS 20 748 204800 2500
61038941 kefaa2 H Sept. 21, 2019, 9:52 p.m. OK GNU C++17 TESTS 20 780 102400 2500
41588649 Dance_Of_Faith H Aug. 14, 2018, 12:53 p.m. OK GNU C++17 TESTS 20 780 251289600 2500
47893177 gtx1080 H Jan. 4, 2019, 8:21 a.m. OK GNU C++17 TESTS 20 795 200704000 2500
63692913 Roundgod H Oct. 29, 2019, 3:49 a.m. OK GNU C++17 TESTS 20 858 307200 2500
60150789 chuducanhchy H Sept. 6, 2019, 3:52 a.m. OK GNU C++17 TESTS 20 889 200601600 2500
36523258 The_Unbeatable H March 23, 2018, 7:25 a.m. OK GNU C++17 Diagnostics TESTS 20 3541 100966400 2500
67975582 Dukkha H Dec. 30, 2019, 4:46 p.m. OK Java 11 TESTS 20 3447 260710400 2500
36642868 dalt H March 26, 2018, 12:51 p.m. OK Java 8 TESTS 20 2792 20787200 2500
36638411 7dan H March 26, 2018, 10:22 a.m. OK Java 8 TESTS 20 2870 268390400 2500
36738214 Apsara H March 30, 2018, 5:47 a.m. OK Java 8 TESTS 20 3431 268390400 2500
36738228 Apsara H March 30, 2018, 5:48 a.m. OK Java 8 TESTS 20 3478 268390400 2500

remove filters

Back to search problems