Educational Codeforces Round 54 (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
1076 Educational Codeforces Round 54 (Rated for Div. 2) FINISHED False 7200 195492324 Nov. 12, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3823 ) E Vasya and a Tree PROGRAMMING data structures trees 1900

B"Vasya has a tree consisting of n vertices with root in vertex 1 . At first all vertices has 0 written on it. Let d(i, j) be the distance between vertices i and j , i.e. number of edges in the shortest path from i to j . Also, let's denote k -subtree of vertex x -- set of vertices y such that next two conditions are met: Vasya needs you to process m queries. The i -th query is a triple v_i , d_i and x_i . For each query Vasya adds value x_i to each vertex from d_i -subtree of v_i . Report to Vasya all values, written on vertices of the tree after processing all queries. The first line contains single integer n ( 1 <= n <= 3 cdot 10^5 ) -- number of vertices in the tree. Each of next n - 1 lines contains two integers x and y ( 1 <= x, y <= n ) -- edge between vertices x and y . It is guarantied that given graph is a tree. Next line contains single integer m ( 1 <= m <= 3 cdot 10^5 ) -- number of queries. Each of next m lines contains three integers v_i , d_i , x_i ( 1 <= v_i <= n , 0 <= d_i <= 10^9 , 1 <= x_i <= 10^9 ) -- description of the i -th query. Print n integers. The i -th integers is the value, written in the i -th vertex after processing all queries. In the first exapmle initial values in vertices are 0, 0, 0, 0, 0 . After the first query values will be equal to 1, 1, 1, 0, 0 . After the second query values will be equal to 1, 11, 1, 0, 0 . After the third query values will be equal to 1, 11, 1, 100, 0 . "...

Tutorials

E

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
69591337 rr_ E Jan. 26, 2020, 11:54 p.m. OK D TESTS 39 889 63488000 1900
52447813 sansen E April 7, 2019, 8:36 a.m. OK GNU C11 TESTS 39 265 42086400 1900
49514855 rainboy E Feb. 6, 2019, 1:04 a.m. OK GNU C11 TESTS 39 1388 37580800 1900
49514514 rainboy E Feb. 6, 2019, 12:28 a.m. OK GNU C11 TESTS 39 1450 32972800 1900
49505919 rainboy E Feb. 5, 2019, 5:30 p.m. OK GNU C11 TESTS 39 1574 38195200 1900
45800419 zhoian E Nov. 16, 2018, 1:03 p.m. OK GNU C++11 TESTS 39 264 33484800 1900
63281509 KING_LRL E Oct. 24, 2019, 8:51 a.m. OK GNU C++11 TESTS 39 280 24268800 1900
53006893 Scut82 E April 19, 2019, 10:01 a.m. OK GNU C++11 TESTS 39 280 27545600 1900
64369045 luogu_bot1 E Nov. 6, 2019, 1:47 p.m. OK GNU C++11 TESTS 39 280 28774400 1900
68316716 910306264 E Jan. 6, 2020, 1:28 p.m. OK GNU C++11 TESTS 39 280 29593600 1900
48428570 luogu_bot5 E Jan. 15, 2019, 4:06 p.m. OK GNU C++11 TESTS 39 280 30105600 1900
45996892 Memory_of_winter E Nov. 20, 2018, 12:45 p.m. OK GNU C++11 TESTS 39 280 32256000 1900
45766932 Cothrax E Nov. 15, 2018, 12:37 p.m. OK GNU C++11 TESTS 39 311 34611200 1900
46191396 vjudge5 E Nov. 25, 2018, 5:27 a.m. OK GNU C++11 TESTS 39 312 27648000 1900
45651702 Lucky__Boy E Nov. 13, 2018, 2:07 a.m. OK GNU C++11 TESTS 39 326 35635200 1900
45699191 nickluo E Nov. 14, 2018, 6:51 a.m. OK GNU C++14 TESTS 39 217 27238400 1900
45699262 nickluo E Nov. 14, 2018, 6:54 a.m. OK GNU C++14 TESTS 39 218 27340800 1900
48657215 ReaLNero1 E Jan. 21, 2019, 3:36 a.m. OK GNU C++14 TESTS 39 233 27033600 1900
45699056 nickluo E Nov. 14, 2018, 6:44 a.m. OK GNU C++14 TESTS 39 265 25292800 1900
45700648 edisonhello E Nov. 14, 2018, 7:57 a.m. OK GNU C++14 TESTS 39 327 38912000 1900
45653899 wleung_bvg E Nov. 13, 2018, 4:38 a.m. OK GNU C++14 TESTS 39 327 41062400 1900
45653872 wleung_bvg E Nov. 13, 2018, 4:36 a.m. OK GNU C++14 TESTS 39 358 37888000 1900
45698675 nickluo E Nov. 14, 2018, 6:23 a.m. OK GNU C++14 TESTS 39 373 44953600 1900
45637925 wleung_bvg E Nov. 12, 2018, 8:26 p.m. OK GNU C++14 TESTS 39 389 40345600 1900
45698894 nickluo E Nov. 14, 2018, 6:35 a.m. OK GNU C++14 TESTS 39 405 31334400 1900
45698256 DevilInChina E Nov. 14, 2018, 6:02 a.m. OK GNU C++17 TESTS 39 327 33792000 1900
61449572 Lezedary_sandwich E Sept. 29, 2019, 1:09 a.m. OK GNU C++17 TESTS 39 405 52940800 1900
45661197 reviewluminous E Nov. 13, 2018, 6:40 a.m. OK GNU C++17 TESTS 39 421 31436800 1900
56953131 vjudge4 E July 13, 2019, 3:09 a.m. OK GNU C++17 TESTS 39 452 30003200 1900
46388942 nimphy E Nov. 30, 2018, 3:32 a.m. OK GNU C++17 TESTS 39 467 62464000 1900
46389079 nimphy E Nov. 30, 2018, 3:42 a.m. OK GNU C++17 TESTS 39 467 62464000 1900
45770133 AiChiMomo E Nov. 15, 2018, 2:06 p.m. OK GNU C++17 TESTS 39 468 30412800 1900
60385847 hello_kiss E Sept. 11, 2019, 11:28 a.m. OK GNU C++17 TESTS 39 482 26419200 1900
60269980 lyh1999 E Sept. 8, 2019, 3:02 p.m. OK GNU C++17 TESTS 39 483 26419200 1900
46388952 nimphy E Nov. 30, 2018, 3:32 a.m. OK GNU C++17 TESTS 39 483 62464000 1900
64761307 IslamTalipovTop E Nov. 12, 2019, 7:12 p.m. OK Java 11 TESTS 39 1435 177561600 1900
69417863 TheSawan E Jan. 23, 2020, 1:35 p.m. OK Java 11 TESTS 39 1856 252518400 1900
69419189 TheSawan E Jan. 23, 2020, 1:56 p.m. OK Java 11 TESTS 39 1996 198963200 1900
69419017 TheSawan E Jan. 23, 2020, 1:53 p.m. OK Java 11 TESTS 39 1996 198963200 1900
45689739 aman28rwt E Nov. 13, 2018, 8:03 p.m. OK Java 8 TESTS 39 561 73318400 1900
45689390 aman28rwt E Nov. 13, 2018, 7:56 p.m. OK Java 8 TESTS 39 577 56627200 1900
45689658 aman28rwt E Nov. 13, 2018, 8:01 p.m. OK Java 8 TESTS 39 577 73318400 1900
45630591 StayAwayFromBitches E Nov. 12, 2018, 4:46 p.m. OK Java 8 TESTS 39 717 90214400 1900
45649277 SevenDeadlySins E Nov. 12, 2018, 10:34 p.m. OK Java 8 TESTS 39 826 78233600 1900
48459384 amolpratap007 E Jan. 16, 2019, 1:57 p.m. OK Java 8 TESTS 39 935 110182400 1900
45632397 Musin E Nov. 12, 2018, 5:28 p.m. OK Java 8 TESTS 39 951 86118400 1900
45687959 jenish9599 E Nov. 13, 2018, 7:21 p.m. OK Java 8 TESTS 39 966 121753600 1900
46259942 revanthreddy85 E Nov. 26, 2018, 7:13 p.m. OK Java 8 TESTS 39 982 105676800 1900
46050210 rahulkhairwar E Nov. 22, 2018, 6:44 a.m. OK Java 8 TESTS 39 982 130048000 1900
45786181 eki E Nov. 16, 2018, 1:57 a.m. OK Mono C# TESTS 39 1980 104448000 1900
49079162 scorpiowf E Jan. 28, 2019, 5:24 a.m. OK MS C++ TESTS 39 545 85708800 1900
55127753 vjudge3 E June 5, 2019, 1:40 p.m. OK MS C++ TESTS 39 577 28569600 1900
45668708 CtrlAlt E Nov. 13, 2018, 9:15 a.m. OK MS C++ TESTS 39 592 32563200 1900
55084295 vjudge1 E June 4, 2019, 11:59 a.m. OK MS C++ TESTS 39 639 39424000 1900
63729970 vjudge4 E Oct. 29, 2019, 1:45 p.m. OK MS C++ TESTS 39 795 36761600 1900
45767486 DavitMarg E Nov. 15, 2018, 12:53 p.m. OK MS C++ TESTS 39 1513 46080000 1900
46173303 MazeGame E Nov. 24, 2018, 1:52 p.m. OK MS C++ TESTS 39 1575 47923200 1900
58073821 kyw E July 31, 2019, 11:39 a.m. OK MS C++ 2017 TESTS 39 748 26112000 1900
50584883 taolahung01 E Feb. 28, 2019, 2:23 a.m. OK MS C++ 2017 TESTS 39 1606 33280000 1900
59854345 siwei E Sept. 1, 2019, 12:55 p.m. OK MS C++ 2017 TESTS 39 1653 28467200 1900
59854384 siwei E Sept. 1, 2019, 12:56 p.m. OK MS C++ 2017 TESTS 39 1715 28467200 1900
59854302 siwei E Sept. 1, 2019, 12:54 p.m. OK MS C++ 2017 TESTS 39 1809 28467200 1900
65791942 sansen E Nov. 26, 2019, 11:36 p.m. OK Rust TESTS 39 420 68198400 1900
45667563 yakamoto E Nov. 13, 2018, 8:33 a.m. OK Scala TESTS 39 1621 98918400 1900

remove filters

Back to search problems