Educational Codeforces Round 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
600 Educational Codeforces Round 2 FINISHED False 7200 283186799 Nov. 27, 2015, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14216 ) E Lomsat gelral PROGRAMMING data structures dfs and similar ds trees 2300

B"You are given a rooted tree with root in vertex 1. Each vertex is coloured in some colour. Let's call colour c dominating in the subtree of vertex v if there are no other colours that appear in the subtree of vertex v more times than colour c. So it's possible that two or more colours will be dominating in the subtree of some vertex. The subtree of vertex v is the vertex v and all other vertices that contains vertex v in each path to the root. For each vertex v find the sum of all dominating colours in the subtree of vertex v. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of vertices in the tree. The second line contains n integers ci (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ci xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n), ci -- the colour of the i-th vertex. Each of the next n xe2 x80 x89- xe2 x80 x891 lines contains two integers xj, xe2 x80 x89yj (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xj, xe2 x80 x89yj xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the edge of the tree. The first vertex is the root of the tree. Print n integers -- the sums of dominating colours for each vertex."...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
48816086 changruinian2020 E Jan. 23, 2019, 2:58 p.m. OK Clang++17 Diagnostics TESTS 28 296 80076800 2300
25067564 apt123 E Feb. 27, 2017, 2:14 a.m. OK FPC TESTS 28 265 8396800 2300
25067548 apt123 E Feb. 27, 2017, 2:12 a.m. OK FPC TESTS 28 265 8499200 2300
26489905 zhanggengchen E April 19, 2017, 6:43 a.m. OK FPC TESTS 28 265 8908800 2300
25541418 zhanggengchen E March 16, 2017, 7:49 a.m. OK FPC TESTS 28 280 8908800 2300
40863602 beng E July 28, 2018, 1:15 a.m. OK FPC TESTS 28 280 18022400 2300
43993737 beng E Oct. 8, 2018, 10:26 a.m. OK FPC TESTS 28 373 18022400 2300
44653759 luogu_bot5 E Oct. 21, 2018, 12:17 p.m. OK FPC TESTS 28 420 109772800 2300
34959378 crxis E Feb. 6, 2018, 2:39 a.m. OK GNU C TESTS 28 93 11059200 2300
27702625 crazy_cloud E June 10, 2017, 8:36 a.m. OK GNU C++ TESTS 28 46 14438400 2300
29480625 zx2003 E Aug. 15, 2017, 12:01 p.m. OK GNU C++ TESTS 28 46 14643200 2300
25319621 Chenhongkan E March 7, 2017, 11:33 a.m. OK GNU C++ TESTS 28 61 12902400 2300
22175321 Spylft E Nov. 12, 2016, 9:45 a.m. OK GNU C++ TESTS 28 62 9216000 2300
22174769 Spylft E Nov. 12, 2016, 9:03 a.m. OK GNU C++ TESTS 28 62 9216000 2300
42090214 dtcxzyw E Aug. 25, 2018, 12:50 p.m. OK GNU C++ TESTS 28 62 11366400 2300
25319641 Chenhongkan E March 7, 2017, 11:34 a.m. OK GNU C++ TESTS 28 62 12902400 2300
39410788 hl666 E June 19, 2018, 12:34 p.m. OK GNU C++ TESTS 28 62 13926400 2300
35813175 hhhwsqhhh E March 1, 2018, 1:56 p.m. OK GNU C++ TESTS 28 77 10035200 2300
41122619 vjudge3 E Aug. 2, 2018, 12:42 p.m. OK GNU C++ TESTS 28 77 10444800 2300
60321560 rainboy E Sept. 9, 2019, 8:50 p.m. OK GNU C11 TESTS 28 451 14131200 2300
22898430 Ajatar E Dec. 12, 2016, 6:07 a.m. OK GNU C++11 TESTS 28 46 12185600 2300
22918398 Cherries E Dec. 13, 2016, 2:30 a.m. OK GNU C++11 TESTS 28 46 16793600 2300
67685154 zjjcth330 E Dec. 27, 2019, 8:31 a.m. OK GNU C++11 TESTS 28 46 18124800 2300
47442609 cxcxccx E Dec. 24, 2018, 3:17 a.m. OK GNU C++11 TESTS 28 46 18124800 2300
53467944 Formiko E April 28, 2019, 11:13 a.m. OK GNU C++11 TESTS 28 61 10854400 2300
44176967 hl666 E Oct. 12, 2018, 9:20 a.m. OK GNU C++11 TESTS 28 61 13926400 2300
46834427 changle_cyx E Dec. 9, 2018, 11:56 p.m. OK GNU C++11 TESTS 28 61 19148800 2300
44737928 FlashHu E Oct. 23, 2018, 1:31 p.m. OK GNU C++11 TESTS 28 62 8089600 2300
60524082 DWAE86 E Sept. 14, 2019, 9:38 a.m. OK GNU C++11 TESTS 28 62 9011200 2300
61044268 vjudge3 E Sept. 22, 2019, 3:17 a.m. OK GNU C++11 TESTS 28 62 9318400 2300
60674721 iotang E Sept. 16, 2019, 12:02 p.m. OK GNU C++14 TESTS 28 77 10035200 2300
22846452 PMichalak E Dec. 10, 2016, 12:31 a.m. OK GNU C++14 TESTS 28 78 16179200 2300
33863790 ChesterKing E Jan. 2, 2018, 12:39 p.m. OK GNU C++14 TESTS 28 78 16486400 2300
22846437 PMichalak E Dec. 10, 2016, 12:29 a.m. OK GNU C++14 TESTS 28 78 16588800 2300
41083243 linkfqy E Aug. 1, 2018, 1:02 p.m. OK GNU C++14 TESTS 28 93 10547200 2300
22846425 PMichalak E Dec. 10, 2016, 12:26 a.m. OK GNU C++14 TESTS 28 93 16588800 2300
29479344 IgorSmirnov E Aug. 15, 2017, 11 a.m. OK GNU C++14 TESTS 28 93 26931200 2300
52253269 sunshiness E April 3, 2019, 3:04 a.m. OK GNU C++14 TESTS 28 108 12800000 2300
29365967 NiroBC E Aug. 12, 2017, 1:39 a.m. OK GNU C++14 TESTS 28 109 8704000 2300
68590793 vjudge2 E Jan. 11, 2020, 12:36 p.m. OK GNU C++14 TESTS 28 109 9216000 2300
64312664 Louhc E Nov. 5, 2019, 1:12 p.m. OK GNU C++17 TESTS 28 61 14950400 2300
45793751 fcwww E Nov. 16, 2018, 9:03 a.m. OK GNU C++17 TESTS 28 62 10854400 2300
45793386 fcwww E Nov. 16, 2018, 8:49 a.m. OK GNU C++17 TESTS 28 108 10752000 2300
60748844 nickluo E Sept. 18, 2019, 4:34 a.m. OK GNU C++17 TESTS 28 108 12288000 2300
46417761 2016551107funky E Nov. 30, 2018, 8:21 p.m. OK GNU C++17 TESTS 28 108 12390400 2300
58336963 qinyuyang E Aug. 5, 2019, 11:50 a.m. OK GNU C++17 TESTS 28 108 15974400 2300
62576571 vjudge4 E Oct. 14, 2019, 4:04 p.m. OK GNU C++17 TESTS 28 109 9216000 2300
48909759 PDDNB E Jan. 25, 2019, 1 a.m. OK GNU C++17 TESTS 28 109 11468800 2300
45564227 vjudge2 E Nov. 11, 2018, 1:26 p.m. OK GNU C++17 TESTS 28 109 11571200 2300
68123536 vjudge3 E Jan. 3, 2020, 2:15 p.m. OK GNU C++17 TESTS 28 109 13209600 2300
22919815 digiter E Dec. 13, 2016, 5:22 a.m. OK Go TESTS 28 421 7680000 2300
23330854 digiter E Dec. 26, 2016, 1:17 a.m. OK Go TESTS 28 468 47616000 2300
23352088 digiter E Dec. 27, 2016, 4:39 a.m. OK Go TESTS 28 514 49971200 2300
23411035 digiter E Dec. 30, 2016, 12:15 a.m. OK Go TESTS 28 514 68403200 2300
22920000 digiter E Dec. 13, 2016, 5:39 a.m. OK Go TESTS 28 561 14028800 2300
23411003 digiter E Dec. 30, 2016, 12:09 a.m. OK Go TESTS 28 608 50073600 2300
23022449 digiter E Dec. 16, 2016, 5:21 a.m. OK Go TESTS 28 717 66457600 2300
19261023 pavel.rosputko E July 19, 2016, 6:56 p.m. OK Haskell TESTS 28 420 81100800 2300
19251991 pavel.rosputko E July 19, 2016, 2:50 p.m. OK Haskell TESTS 28 420 81100800 2300
19258565 pavel.rosputko E July 19, 2016, 5:23 p.m. OK Haskell TESTS 28 421 81100800 2300
19258089 pavel.rosputko E July 19, 2016, 5:11 p.m. OK Haskell TESTS 28 436 80076800 2300
19258118 pavel.rosputko E July 19, 2016, 5:11 p.m. OK Haskell TESTS 28 467 81100800 2300
19261034 pavel.rosputko E July 19, 2016, 6:56 p.m. OK Haskell TESTS 28 529 142028800 2300
19258913 pavel.rosputko E July 19, 2016, 5:34 p.m. OK Haskell TESTS 28 530 151449600 2300
18294943 alibaba E June 8, 2016, 8:09 a.m. OK Java 7 TESTS 28 1153 65433600 2300
36470394 tri E March 22, 2018, 6:09 a.m. OK Java 8 TESTS 28 265 28672000 2300
47805122 qiyue E Jan. 1, 2019, 6:21 a.m. OK Java 8 TESTS 28 311 38707200 2300
52433767 dalt E April 7, 2019, 1:45 a.m. OK Java 8 TESTS 28 311 70963200 2300
47805608 qiyue E Jan. 1, 2019, 6:53 a.m. OK Java 8 TESTS 28 327 29184000 2300
31507446 RP_9 E Oct. 19, 2017, 12:19 p.m. OK Java 8 TESTS 28 327 55705600 2300
52939898 qiyue E April 18, 2019, 8:38 a.m. OK Java 8 TESTS 28 342 29081600 2300
41733222 I_love_Harpae E Aug. 18, 2018, 12:33 a.m. OK Java 8 TESTS 28 358 30105600 2300
51936241 MaxHeap E March 28, 2019, 12:36 p.m. OK Java 8 TESTS 28 373 24166400 2300
45149979 tsumit023 E Oct. 31, 2018, 7:12 p.m. OK Java 8 TESTS 28 374 45056000 2300
57281521 mennafadali E July 18, 2019, 12:56 p.m. OK Java 8 TESTS 28 389 29593600 2300
41665212 Slamur E Aug. 16, 2018, 9:52 p.m. OK Kotlin TESTS 28 779 81100800 2300
38010840 wleung_bvg E May 8, 2018, 3:50 a.m. OK Mono C# TESTS 28 420 237056000 2300
23000421 camypaper E Dec. 15, 2016, 8:09 a.m. OK MS C# TESTS 28 218 27136000 2300
57788656 vjudge5 E July 26, 2019, 8:42 a.m. OK MS C++ TESTS 28 108 7372800 2300
57719418 vjudge4 E July 25, 2019, 4:30 a.m. OK MS C++ TESTS 28 108 7680000 2300
51856988 vjudge4 E March 26, 2019, 11:36 a.m. OK MS C++ TESTS 28 109 17203200 2300
57788405 vjudge2 E July 26, 2019, 8:37 a.m. OK MS C++ TESTS 28 124 8806400 2300
48909851 vjudge5 E Jan. 25, 2019, 1:08 a.m. OK MS C++ TESTS 28 124 9216000 2300
68664947 vjudge5 E Jan. 12, 2020, 2:48 p.m. OK MS C++ TESTS 28 124 10035200 2300
51856990 vjudge1 E March 26, 2019, 11:36 a.m. OK MS C++ TESTS 28 124 17203200 2300
52668174 vjudge4 E April 13, 2019, 6:01 a.m. OK MS C++ TESTS 28 139 9113600 2300
48570707 vjudge4 E Jan. 19, 2019, 11:50 a.m. OK MS C++ TESTS 28 140 8806400 2300
61351670 vjudge1 E Sept. 27, 2019, 8:31 a.m. OK MS C++ TESTS 28 140 9011200 2300
65957535 ouyeye E Nov. 29, 2019, 1:25 p.m. OK MS C++ 2017 TESTS 28 156 7987200 2300
69967149 vjudge3 E Feb. 1, 2020, 12:59 p.m. OK MS C++ 2017 TESTS 28 186 12083200 2300
68641411 vjudge5 E Jan. 12, 2020, 7:38 a.m. OK MS C++ 2017 TESTS 28 187 70553600 2300
62203501 vjudge4 E Oct. 9, 2019, 12:40 p.m. OK MS C++ 2017 TESTS 28 202 7987200 2300
63723705 EDawn E Oct. 29, 2019, 12:05 p.m. OK MS C++ 2017 TESTS 28 202 62156800 2300
69963489 zhangwen123 E Feb. 1, 2020, 12:05 p.m. OK MS C++ 2017 TESTS 28 233 9216000 2300
64350209 Kirundel E Nov. 6, 2019, 8:02 a.m. OK MS C++ 2017 TESTS 28 343 31334400 2300
68135689 addammy E Jan. 3, 2020, 6:49 p.m. OK PyPy 3 TESTS 28 1996 58060800 2300
64800610 sansen E Nov. 13, 2019, 2:28 p.m. OK Rust TESTS 28 109 30822400 2300

remove filters

Back to search problems