Codeforces Round 169 (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
276 Codeforces Round 169 (Div. 2) FINISHED False 7200 370103399 Feb. 24, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1615 ) E Little Girl and Problem on Trees PROGRAMMING data structures graphs trees 2300

B"A little girl loves problems on trees very much. Here's one of them. A tree is an undirected connected graph, not containing cycles. The degree of node x in the tree is the number of nodes y of the tree, such that each of them is connected with node x by some edge of the tree. Let's consider a tree that consists of n nodes. We'll consider the tree's nodes indexed from 1 to n. The cosidered tree has the following property: each node except for node number 1 has the degree of at most 2. Initially, each node of the tree contains number 0. Your task is to quickly process the requests of two types: The first line contains integers n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) and q (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89q xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of tree nodes and the number of requests, correspondingly. Each of the next n xe2 x80 x89 xe2 x80 x89- xe2 x80 x89 xe2 x80 x891 lines contains two integers ui and vi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ui, xe2 x80 x89vi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, ui xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89vi), that show that there is an edge between nodes ui and vi. Each edge's description occurs in the input exactly once. It is guaranteed that the given graph is a tree that has the property that is described in the statement. Next q lines describe the requests. The numbers in the lines are separated by single spaces. For each request to print the node value print an integer -- the reply to the request."...

Tutorials

Codeforces Round #169 — Unofficial Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
21232766 vjudge4 E Oct. 6, 2016, 11:26 a.m. OK GNU C++ TESTS 70 124 8396800 2300
40990173 ReaLNero1 E July 30, 2018, 11:40 p.m. OK GNU C++ TESTS 70 124 12595200 2300
38578108 Scut82 E May 24, 2018, 6:19 a.m. OK GNU C++ TESTS 70 124 13209600 2300
38314095 Scut82 E May 16, 2018, 8:29 a.m. OK GNU C++ TESTS 70 154 15769600 2300
26168296 yah01 E April 6, 2017, 11:39 a.m. OK GNU C++ TESTS 70 154 19353600 2300
26894134 Superbia-zyb E May 6, 2017, 6:04 a.m. OK GNU C++ TESTS 70 186 7372800 2300
34906101 vjudge2 E Feb. 3, 2018, 7:10 p.m. OK GNU C++ TESTS 70 216 9420800 2300
35175053 vjudge5 E Feb. 12, 2018, 10:38 a.m. OK GNU C++ TESTS 70 216 9625600 2300
34913393 vjudge2 E Feb. 4, 2018, 3:34 a.m. OK GNU C++ TESTS 70 218 9420800 2300
34913150 vjudge5 E Feb. 4, 2018, 3:15 a.m. OK GNU C++ TESTS 70 218 9420800 2300
60585266 rainboy E Sept. 14, 2019, 8:44 p.m. OK GNU C11 TESTS 70 468 9216000 2300
17127405 Penny_Lane E April 2, 2016, 9:35 a.m. OK GNU C++11 TESTS 70 92 9420800 2300
17127221 Penny_Lane E April 2, 2016, 9:21 a.m. OK GNU C++11 TESTS 70 122 9420800 2300
25224074 asifruetcse10 E March 4, 2017, 6:26 p.m. OK GNU C++11 TESTS 70 124 19456000 2300
16266191 kefaa E Feb. 21, 2016, 6:48 p.m. OK GNU C++11 TESTS 70 156 14028800 2300
37507720 skmonir E April 21, 2018, 8:10 a.m. OK GNU C++11 TESTS 70 156 17612800 2300
58539927 iScloud E Aug. 10, 2019, 1:41 p.m. OK GNU C++11 TESTS 70 186 10035200 2300
16310739 vjudge4 E Feb. 24, 2016, 2:42 p.m. OK GNU C++11 TESTS 70 216 10137600 2300
62099948 vjudge3 E Oct. 8, 2019, 8:48 a.m. OK GNU C++11 TESTS 70 218 7372800 2300
62099947 vjudge1 E Oct. 8, 2019, 8:48 a.m. OK GNU C++11 TESTS 70 218 7372800 2300
62100050 vjudge3 E Oct. 8, 2019, 8:50 a.m. OK GNU C++11 TESTS 70 218 7372800 2300
32077469 _AjReme_ E Nov. 5, 2017, 1:40 p.m. OK GNU C++14 TESTS 70 124 11059200 2300
55065909 vjudge4 E June 4, 2019, 3:33 a.m. OK GNU C++14 TESTS 70 248 7577600 2300
55065882 LODB---D E June 4, 2019, 3:32 a.m. OK GNU C++14 TESTS 70 248 7577600 2300
55065869 LODB---D E June 4, 2019, 3:31 a.m. OK GNU C++14 TESTS 70 248 7577600 2300
55065813 LODB---D E June 4, 2019, 3:30 a.m. OK GNU C++14 TESTS 70 248 8294400 2300
57240958 asfd221 E July 17, 2019, 5:38 p.m. OK GNU C++14 TESTS 70 248 9728000 2300
47496028 _Kkura_ E Dec. 25, 2018, 2:59 p.m. OK GNU C++14 TESTS 70 248 11673600 2300
47495939 _Kkura_ E Dec. 25, 2018, 2:57 p.m. OK GNU C++14 TESTS 70 248 11673600 2300
39035453 oToToT E June 8, 2018, 3:52 a.m. OK GNU C++14 TESTS 70 248 11776000 2300
67992440 hemant1729 E Dec. 31, 2019, 5:59 a.m. OK GNU C++14 TESTS 70 248 12390400 2300
55119239 Balerion E June 5, 2019, 10:15 a.m. OK GNU C++17 TESTS 70 248 9728000 2300
54526716 modestas_ E May 23, 2019, 2:51 p.m. OK GNU C++17 TESTS 70 248 10956800 2300
55427003 dmkozyrev E June 11, 2019, 9:31 a.m. OK GNU C++17 TESTS 70 248 11264000 2300
46827919 vjudge5 E Dec. 9, 2018, 7:44 p.m. OK GNU C++17 TESTS 70 248 11571200 2300
55325837 AliShahali1382 E June 9, 2019, 8 a.m. OK GNU C++17 TESTS 70 278 7884800 2300
55119337 vjudge1 E June 5, 2019, 10:18 a.m. OK GNU C++17 TESTS 70 278 9728000 2300
42005369 leaccount E Aug. 23, 2018, 6:02 p.m. OK GNU C++17 TESTS 70 278 12083200 2300
43181293 vjudge3 E Sept. 21, 2018, 1:28 p.m. OK GNU C++17 TESTS 70 280 6963200 2300
39067732 SoGood E June 9, 2018, 11:22 a.m. OK GNU C++17 TESTS 70 280 8908800 2300
55425582 dmkozyrev E June 11, 2019, 8:47 a.m. OK GNU C++17 TESTS 70 280 11264000 2300
16734713 G.Mohamed E March 15, 2016, 9:23 p.m. OK Java 8 TESTS 70 342 3686400 2300
47535065 I_love_Harpae E Dec. 26, 2018, 11:59 p.m. OK Java 8 TESTS 70 466 26112000 2300
21897457 Petruchcho E Oct. 30, 2016, 6:09 p.m. OK Java 8 TESTS 70 590 0 2300
38435535 AQT E May 19, 2018, 3:32 p.m. OK Java 8 TESTS 70 716 17305600 2300
68469273 SpargelTarzan E Jan. 9, 2020, 11:27 p.m. OK Java 8 TESTS 70 746 44441600 2300
20782649 miguelmaurizio E Sept. 20, 2016, 6:21 p.m. OK Java 8 TESTS 70 748 16998400 2300
52621170 Hoda_Hisham E April 11, 2019, 9:47 p.m. OK Java 8 TESTS 70 778 40857600 2300
32883379 flyman3046 E Dec. 2, 2017, 7:21 p.m. OK Java 8 TESTS 70 780 58982400 2300
19472374 lyyllyyl E July 29, 2016, 4:55 a.m. OK Java 8 TESTS 70 872 48025600 2300
60585265 Dukkha E Sept. 14, 2019, 8:44 p.m. OK Java 8 TESTS 70 1246 4812800 2300
24702874 wp32pw E Feb. 15, 2017, 6:24 p.m. OK MS C++ TESTS 70 312 11366400 2300
59350262 yorky E Aug. 23, 2019, 11:31 a.m. OK MS C++ 2017 TESTS 70 810 19968000 2300

remove filters

Back to search problems