Codeforces Round 253 (Div. 1)

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
442 Codeforces Round 253 (Div. 1) FINISHED False 7200 334420204 June 19, 2014, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1012 ) D Adam and Tree PROGRAMMING data structures trees 2500

B"When Adam gets a rooted tree (connected non-directed graph without cycles), he immediately starts coloring it. More formally, he assigns a color to each edge of the tree so that it meets the following two conditions: Not all tree paintings are equally good for Adam. Let's consider the path from some vertex to the root. Let's call the number of distinct colors on this path the cost of the vertex. The cost of the tree's coloring will be the maximum cost among all the vertexes. Help Adam determine the minimum possible cost of painting the tree. Initially, Adam's tree consists of a single vertex that has number one and is the root. In one move Adam adds a new vertex to the already existing one, the new vertex gets the number equal to the minimum positive available integer. After each operation you need to calculate the minimum cost of coloring the resulting tree. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106) -- the number of times a new vertex is added. The second line contains n numbers pi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89pi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i) -- the numbers of the vertexes to which we add another vertex. Print n integers -- the minimum costs of the tree painting after each addition. The figure below shows one of the possible variants to paint a tree from the sample at the last moment. The cost of the vertexes with numbers 11 and 12 equals 3. "...

Tutorials

Codeforces #253 editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
7373164 hos.lyric D Aug. 8, 2014, 4:37 a.m. OK D TESTS 65 997 104140800 2500
6923185 Alex_2oo8 D June 19, 2014, 5:51 p.m. OK Delphi TESTS 65 390 25088000 2500
6992368 citrux D July 1, 2014, 2:09 p.m. OK GNU C TESTS 65 483 16076800 2500
6938050 Maxim D June 21, 2014, 2:53 p.m. OK GNU C++ TESTS 65 124 6963200 2500
6937965 Maxim D June 21, 2014, 2:35 p.m. OK GNU C++ TESTS 65 124 6963200 2500
40988304 ReaLNero1 D July 30, 2018, 9:53 p.m. OK GNU C++ TESTS 65 155 6860800 2500
42072267 Scut82 D Aug. 25, 2018, 1:50 a.m. OK GNU C++ TESTS 65 187 24064000 2500
6994778 dzy493941464 D July 2, 2014, 2:31 a.m. OK GNU C++ TESTS 65 202 16076800 2500
10296598 Tim_LinYd D March 16, 2015, 5:25 a.m. OK GNU C++ TESTS 65 202 16588800 2500
42117557 Scut82 D Aug. 26, 2018, 10:42 a.m. OK GNU C++ TESTS 65 217 26726400 2500
42117489 Scut82 D Aug. 26, 2018, 10:40 a.m. OK GNU C++ TESTS 65 217 26726400 2500
42296209 Scut82 D Aug. 31, 2018, 3:23 a.m. OK GNU C++ TESTS 65 249 24268800 2500
6937938 Maxim D June 21, 2014, 2:33 p.m. OK GNU C++ TESTS 65 264 6963200 2500
7256127 mruxim D July 27, 2014, 8:54 a.m. OK GNU C++0x TESTS 65 343 16076800 2500
6996823 kraskevich D July 2, 2014, 10:56 a.m. OK GNU C++0x TESTS 65 343 48025600 2500
6953082 hadrori D June 24, 2014, 1:33 p.m. OK GNU C++0x TESTS 65 390 16076800 2500
6948788 choice D June 23, 2014, 5:08 p.m. OK GNU C++0x TESTS 65 405 11980800 2500
9466479 stefanzzz D Jan. 18, 2015, 5:24 p.m. OK GNU C++0x TESTS 65 420 12083200 2500
7037567 ecnerwala D July 7, 2014, 4:50 a.m. OK GNU C++0x TESTS 65 420 24064000 2500
6953132 hadrori D June 24, 2014, 1:43 p.m. OK GNU C++0x TESTS 65 420 40038400 2500
9923795 a00012025 D Feb. 19, 2015, 9:17 a.m. OK GNU C++0x TESTS 65 421 11980800 2500
6943028 Amor727 D June 22, 2014, 3:20 p.m. OK GNU C++0x TESTS 65 421 27955200 2500
10296074 zshi D March 16, 2015, 3:30 a.m. OK GNU C++0x TESTS 65 421 38502400 2500
44687864 luogu_bot3 D Oct. 22, 2018, 10:35 a.m. OK GNU C++11 TESTS 65 140 16076800 2500
56004531 renjingyi D June 24, 2019, 2:46 p.m. OK GNU C++11 TESTS 65 171 18124800 2500
31256425 Georeth D Oct. 12, 2017, 5:21 p.m. OK GNU C++11 TESTS 65 171 28057600 2500
53653989 shaojianan D May 2, 2019, 3:22 a.m. OK GNU C++11 TESTS 65 171 32768000 2500
53467369 time_interspace D April 28, 2019, 10:52 a.m. OK GNU C++11 TESTS 65 202 16076800 2500
27963827 FizzyDavid D June 22, 2017, 11:40 a.m. OK GNU C++11 TESTS 65 202 18124800 2500
55292136 RedStar_13 D June 8, 2019, 8:11 a.m. OK GNU C++11 TESTS 65 202 28057600 2500
17175442 yarak D April 5, 2016, 4:56 p.m. OK GNU C++11 TESTS 65 217 18227200 2500
15830109 Arpa D Feb. 5, 2016, 5:22 p.m. OK GNU C++11 TESTS 65 233 20070400 2500
60917824 vjudge1 D Sept. 20, 2019, 9:08 a.m. OK GNU C++11 TESTS 65 264 12083200 2500
51846373 NotNight D March 26, 2019, 4:58 a.m. OK GNU C++14 TESTS 65 421 16076800 2500
48580795 Skywynne D Jan. 19, 2019, 4:33 p.m. OK GNU C++14 TESTS 65 436 16076800 2500
63359756 Maripium D Oct. 25, 2019, 4:57 a.m. OK GNU C++14 TESTS 65 451 11980800 2500
58253802 PinkRabbit D Aug. 4, 2019, 9:03 a.m. OK GNU C++14 TESTS 65 452 19968000 2500
67199952 ElangBondol D Dec. 19, 2019, 10:35 a.m. OK GNU C++14 TESTS 65 467 12288000 2500
44175067 w446506278 D Oct. 12, 2018, 8:25 a.m. OK GNU C++14 TESTS 65 467 16076800 2500
36780184 yusayura D March 31, 2018, 5:22 p.m. OK GNU C++14 TESTS 65 467 23449600 2500
30001739 fengsuiyan D Sept. 2, 2017, 4:08 a.m. OK GNU C++14 TESTS 65 468 22425600 2500
69464896 BamiTorabi D Jan. 24, 2020, 12:26 p.m. OK GNU C++14 TESTS 65 483 16076800 2500
56022148 zhangyuxi D June 25, 2019, 4:28 a.m. OK GNU C++14 TESTS 65 483 16076800 2500
48547371 Smaug D Jan. 18, 2019, 8:36 p.m. OK GNU C++17 TESTS 65 451 16281600 2500
51519712 _Kkura_ D March 19, 2019, 3:52 p.m. OK GNU C++17 TESTS 65 452 12083200 2500
53455142 gubeiqg D April 28, 2019, 1:37 a.m. OK GNU C++17 TESTS 65 467 16076800 2500
48509978 Omelianenko D Jan. 17, 2019, 8:09 p.m. OK GNU C++17 TESTS 65 467 16281600 2500
68099052 yan.silva D Jan. 3, 2020, 12:11 a.m. OK GNU C++17 TESTS 65 468 16076800 2500
58977423 ruo D Aug. 18, 2019, 1:56 a.m. OK GNU C++17 TESTS 65 482 16076800 2500
45703212 vjudge1 D Nov. 14, 2018, 9:55 a.m. OK GNU C++17 TESTS 65 483 20070400 2500
45886539 noDreams D Nov. 17, 2018, 4:20 p.m. OK GNU C++17 TESTS 65 498 15974400 2500
41433723 vilim_l D Aug. 10, 2018, 1:54 p.m. OK GNU C++17 TESTS 65 498 16793600 2500
65036355 Phortox D Nov. 15, 2019, 11:48 a.m. OK GNU C++17 TESTS 65 514 16076800 2500
6944979 net12k44 D June 23, 2014, 3:05 a.m. OK Java 7 TESTS 65 577 61849600 2500
6919129 Egor D June 19, 2014, 4:41 p.m. OK Java 8 TESTS 65 545 409600 2500
6921389 mmaxio D June 19, 2014, 5:16 p.m. OK Java 8 TESTS 65 638 14336000 2500
6927950 fetetriste D June 20, 2014, 1:32 p.m. OK Java 8 TESTS 65 686 29081600 2500
38570662 sweiss D May 23, 2018, 7:07 p.m. OK Java 8 TESTS 65 702 67276800 2500
6927944 fetetriste D June 20, 2014, 1:31 p.m. OK Java 8 TESTS 65 716 28979200 2500
6944772 AlexFetisov D June 23, 2014, 1:29 a.m. OK Java 8 TESTS 65 826 14233600 2500
6964431 IgorKoval D June 26, 2014, 3:23 p.m. OK Java 8 TESTS 65 1637 147456000 2500
33308876 Noureldin D Dec. 16, 2017, 1:27 p.m. OK Java 8 TESTS 65 1824 186777600 2500
8864821 Alex7 D Nov. 26, 2014, 10:57 p.m. OK MS C++ TESTS 65 436 16076800 2500
7498193 gxnncrx1993 D Aug. 18, 2014, 6:33 a.m. OK MS C++ TESTS 65 436 17817600 2500
6952755 Filyan D June 24, 2014, 12:25 p.m. OK MS C++ TESTS 65 452 20070400 2500
7108558 urusant D July 15, 2014, 11:47 a.m. OK MS C++ TESTS 65 467 16076800 2500
6952634 Filyan D June 24, 2014, 12:04 p.m. OK MS C++ TESTS 65 467 20070400 2500
57093301 vjudge4 D July 15, 2019, 11:27 a.m. OK MS C++ TESTS 65 482 16076800 2500
57071677 vjudge4 D July 15, 2019, 2:55 a.m. OK MS C++ TESTS 65 482 16076800 2500
6956232 vuonghy2442 D June 25, 2014, 6:28 a.m. OK MS C++ TESTS 65 483 11980800 2500
57015093 vjudge5 D July 14, 2019, 11:14 a.m. OK MS C++ TESTS 65 483 20070400 2500
6938568 Scorpy D June 21, 2014, 4:14 p.m. OK MS C++ TESTS 65 499 20070400 2500
7037543 Schrodi D July 7, 2014, 4:45 a.m. OK Ocaml TESTS 65 857 21913600 2500
7035759 Schrodi D July 6, 2014, 10:02 p.m. OK Ocaml TESTS 65 1154 29184000 2500
7020066 Schrodi D July 6, 2014, 7:58 a.m. OK Ocaml TESTS 65 1528 61849600 2500
7018456 Schrodi D July 6, 2014, 12:25 a.m. OK Ocaml TESTS 65 1903 88883200 2500
7018481 Schrodi D July 6, 2014, 12:34 a.m. OK Ocaml TESTS 65 1965 88883200 2500

remove filters

Back to search problems