Educational Codeforces Round 106 (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
1499 Educational Codeforces Round 106 (Rated for Div. 2) FINISHED False 7200 121100963 March 18, 2021, 2:50 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1388 ) F Diameter Cuts PROGRAMMING dfs and similar dp trees

B'You are given an integer k and an undirected tree, consisting of n vertices. The length of a simple path (a path in which each vertex appears at most once) between some pair of vertices is the number of edges in this path. A diameter of a tree is the maximum length of a simple path between all pairs of vertices of this tree. You are about to remove a set of edges from the tree. The tree splits into multiple smaller trees when the edges are removed. The set of edges is valid if all the resulting trees have diameter less than or equal to k . Two sets of edges are different if there is an edge such that it appears in only one of the sets. Count the number of valid sets of edges modulo 998 ,244 ,353 . The first line contains two integers n and k ( 2 <= n <= 5000 , 0 <= k <= n - 1 ) -- the number of vertices of the tree and the maximum allowed diameter, respectively. Each of the next n-1 lines contains a description of an edge: two integers v and u ( 1 <= v, u <= n , v neq u ). The given edges form a tree. Print a single integer -- the number of valid sets of edges modulo 998 ,244 ,353 . In the first example the diameter of the given tree is already less than or equal to k . Thus, you can choose any set of edges to remove and the resulting trees will have diameter less than or equal to k . There are 2^3 sets, including the empty one. In the second example you have to remove the only edge. Otherwise, the diameter will be 1 , which is greater than 0 . Here are the trees for the third and the fourth examples: '...

Tutorials

Educational Codeforces Round 106 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
110391671 rainboy F March 18, 2021, 5:37 p.m. OK GNU C11 TESTS 52 577 100966400
110384703 fallleaves01 F March 18, 2021, 4:47 p.m. OK GNU C++11 TESTS 52 171 102912000
110383058 spc349 F March 18, 2021, 4:43 p.m. OK GNU C++11 TESTS 52 187 115609600
110412424 Baiyu0123 F March 19, 2021, 3:25 a.m. OK GNU C++11 TESTS 52 265 209203200
110396555 prabowo F March 18, 2021, 6:44 p.m. OK GNU C++11 TESTS 52 421 101171200
110384063 rdfzXR F March 18, 2021, 4:45 p.m. OK GNU C++11 TESTS 52 436 101068800
110381902 Arraiter F March 18, 2021, 4:39 p.m. OK GNU C++11 TESTS 52 451 101273600
110378847 qinzhaoyang F March 18, 2021, 4:31 p.m. OK GNU C++11 TESTS 52 529 202240000
110384333 oisdoaiu F March 18, 2021, 4:46 p.m. OK GNU C++11 TESTS 52 701 201420800
110394782 hzy9819 F March 18, 2021, 6:19 p.m. OK GNU C++11 TESTS 52 764 202137600
110409838 OMG_link F March 19, 2021, 2:08 a.m. OK GNU C++11 TESTS 52 1341 201932800
110408473 HynDuf F March 19, 2021, 1:08 a.m. OK GNU C++14 TESTS 52 155 101273600
110400713 jainbot27 F March 18, 2021, 8:01 p.m. OK GNU C++14 TESTS 52 217 51200000
110405849 MatheusLealV F March 18, 2021, 10:47 p.m. OK GNU C++14 TESTS 52 405 101683200
110390134 LunaticGe F March 18, 2021, 5:19 p.m. OK GNU C++14 TESTS 52 498 100864000
110381548 bktl1love F March 18, 2021, 4:38 p.m. OK GNU C++14 TESTS 52 499 201625600
110386602 NaimSS F March 18, 2021, 4:53 p.m. OK GNU C++14 TESTS 52 670 205107200
110379759 crewmate F March 18, 2021, 4:33 p.m. OK GNU C++14 TESTS 52 1403 201625600
110382917 peace F March 18, 2021, 4:42 p.m. OK GNU C++14 TESTS 52 1450 201523200
110399940 cjtoribio F March 18, 2021, 7:45 p.m. OK GNU C++17 TESTS 52 124 3481600
110379248 SSerxhs F March 18, 2021, 4:32 p.m. OK GNU C++17 TESTS 52 139 921600
110394263 2018.aditya.sawant F March 18, 2021, 6:11 p.m. OK GNU C++17 TESTS 52 155 113971200
110405767 Blondie F March 18, 2021, 10:43 p.m. OK GNU C++17 TESTS 52 171 2048000
110408719 penguinhacker F March 19, 2021, 1:20 a.m. OK GNU C++17 TESTS 52 171 101273600
110378085 RUSH_D_CAT F March 18, 2021, 4:29 p.m. OK GNU C++17 TESTS 52 202 201625600
110387491 atodo F March 18, 2021, 4:58 p.m. OK GNU C++17 TESTS 52 248 101376000
110390008 cuiaoxiang F March 18, 2021, 5:18 p.m. OK GNU C++17 TESTS 52 249 202035200
110402789 dtc03012 F March 18, 2021, 8:51 p.m. OK GNU C++17 TESTS 52 265 205312000
110381708 xb0nS F March 18, 2021, 4:39 p.m. OK GNU C++17 TESTS 52 373 101171200
110380205 Kude F March 18, 2021, 4:35 p.m. OK GNU C++17 (64) TESTS 52 61 1331200
110395036 nor F March 18, 2021, 6:22 p.m. OK GNU C++17 (64) TESTS 52 61 1433600
110393670 nor F March 18, 2021, 6:04 p.m. OK GNU C++17 (64) TESTS 52 62 1433600
110410113 SPD_9X2 F March 19, 2021, 2:16 a.m. OK GNU C++17 (64) TESTS 52 78 1740800
110392723 aryanc403 F March 18, 2021, 5:50 p.m. OK GNU C++17 (64) TESTS 52 78 2048000
110392922 aryanc403 F March 18, 2021, 5:53 p.m. OK GNU C++17 (64) TESTS 52 78 2150400
110413967 DQ9911 F March 19, 2021, 4:08 a.m. OK GNU C++17 (64) TESTS 52 78 51609600
110398109 physics0523 F March 18, 2021, 7:11 p.m. OK GNU C++17 (64) TESTS 52 108 51097600
110380729 ransewhale F March 18, 2021, 4:36 p.m. OK GNU C++17 (64) TESTS 52 108 202035200
110414040 BiIIy F March 19, 2021, 4:10 a.m. OK GNU C++17 (64) TESTS 52 109 51712000
110412374 0x3F F March 19, 2021, 3:24 a.m. OK Go TESTS 52 295 10240000
110412411 0x3F F March 19, 2021, 3:25 a.m. OK Go TESTS 52 296 116940800
110413297 0x3F F March 19, 2021, 3:51 a.m. OK Go TESTS 52 420 10035200
110384009 uwi F March 18, 2021, 4:45 p.m. OK Java 11 TESTS 52 764 233779200
110401611 Dukkha F March 18, 2021, 8:22 p.m. OK Java 11 TESTS 52 1279 138444800

remove filters

Back to search problems