Codeforces Round 512 (Div. 1, based on Technocup 2019 Elimination Round 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
1053 Codeforces Round 512 (Div. 1, based on Technocup 2019 Elimination Round 1) FINISHED False 7200 199817724 Sept. 23, 2018, 1:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 214 ) E Euler tour PROGRAMMING constructive algorithms trees 3500

B'Euler is a little, cute squirrel. When the autumn comes, he collects some reserves for winter. The interesting fact is that Euler likes to collect acorns in a specific way. A tree can be described as n acorns connected by n - 1 branches, such that there is exactly one way between each pair of acorns. Let 's enumerate the acorns from 1 to n . The squirrel chooses one acorn (not necessary with number 1 ) as a start, and visits them in a way called "Euler tour" (see notes), collecting each acorn when he visits it for the last time. Today morning Kate was observing Euler. She took a sheet of paper and wrote down consecutive indices of acorns on his path. Unfortunately, during her way to home it started raining and some of numbers became illegible. Now the girl is very sad, because she has to present the observations to her teacher. "Maybe if I guess the lacking numbers, I 'll be able to do it!" she thought. Help her and restore any valid Euler tour of some tree or tell that she must have made a mistake. The first line contains a single integer n ( 1 <= q n <= q 5 cdot 10^5 ), denoting the number of acorns in the tree. The second line contains 2n - 1 integers a_1, a_2, ldots, a_{2n-1} ( 0 <= q a_i <= q n ) -- the Euler tour of the tree that Kate wrote down. 0 means an illegible number, which has to be guessed. If there is no Euler tour satisfying the given description, output "no" in the first line. Otherwise, on the first line output "yes", and then in the second line print the Euler tour which satisfy the given description. Any valid Euler tour will be accepted, since the teacher doesn 't know how exactly the initial tree looks. An Euler tour of a tree with n acorns is a sequence of 2n - 1 indices of acorns. such that each acorn occurs at least once, the first and the last acorns are same and each two consecutive acorns are directly connected with a branch. '...

Tutorials

Сodeforces Round 512 (and Technocup — Elimination Round 1) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
56787306 iotang E July 10, 2019, 8:59 a.m. OK GNU C++11 TESTS 67 234 46284800 3500
61948612 wadewlison E Oct. 6, 2019, 1:59 a.m. OK GNU C++11 TESTS 67 249 28262400 3500
63240911 zinai_boboyang E Oct. 23, 2019, 1:26 p.m. OK GNU C++11 TESTS 67 249 39321600 3500
57788535 DeaphetS E July 26, 2019, 8:39 a.m. OK GNU C++11 TESTS 67 249 39424000 3500
44751500 ReaLNero1 E Oct. 23, 2018, 8:12 p.m. OK GNU C++11 TESTS 67 264 24064000 3500
61948109 luogu_bot5 E Oct. 6, 2019, 1:41 a.m. OK GNU C++11 TESTS 67 264 39321600 3500
64285048 flyFeather E Nov. 5, 2019, 4:22 a.m. OK GNU C++11 TESTS 67 265 39321600 3500
43978636 samjia2000 E Oct. 7, 2018, 11:50 p.m. OK GNU C++11 TESTS 67 312 64409600 3500
43592534 251 E Sept. 30, 2018, 4:05 a.m. OK GNU C++11 TESTS 67 327 24064000 3500
56775054 lwhlwh E July 10, 2019, 2:05 a.m. OK GNU C++11 TESTS 67 342 60108800 3500
49895966 ochilov-2004 E Feb. 14, 2019, 6:57 a.m. OK GNU C++14 TESTS 67 405 19046400 3500
48801201 minhphuoc1998 E Jan. 23, 2019, 2:29 p.m. OK GNU C++14 TESTS 67 405 19251200 3500
57758369 ctlchild E July 25, 2019, 5:05 p.m. OK GNU C++14 TESTS 67 420 39628800 3500
50355438 _anurocks_ E Feb. 23, 2019, 10:25 a.m. OK GNU C++14 TESTS 67 421 19046400 3500
44406385 NiroBC E Oct. 16, 2018, 3 p.m. OK GNU C++14 TESTS 67 451 26009600 3500
43495129 consecutivelimit E Sept. 27, 2018, 2:20 p.m. OK GNU C++14 TESTS 67 467 19046400 3500
59930561 Scut82 E Sept. 3, 2019, 6:59 a.m. OK GNU C++14 TESTS 67 467 21606400 3500
56744424 zsyzsy E July 9, 2019, 9:01 a.m. OK GNU C++14 TESTS 67 467 39321600 3500
56775389 yybyyb E July 10, 2019, 2:18 a.m. OK GNU C++14 TESTS 67 467 39424000 3500
59930135 Scut82 E Sept. 3, 2019, 6:43 a.m. OK GNU C++14 TESTS 67 482 23654400 3500
57791341 YangDavid E July 26, 2019, 9:34 a.m. OK GNU C++17 TESTS 67 420 45363200 3500
49684799 pandora_lee E Feb. 10, 2019, 6:20 a.m. OK GNU C++17 TESTS 67 451 22732800 3500
43392922 Asadullo_Ganiev E Sept. 25, 2018, 2:55 a.m. OK GNU C++17 TESTS 67 483 24064000 3500
62575039 ak_taniya E Oct. 14, 2019, 3:38 p.m. OK GNU C++17 TESTS 67 483 39424000 3500
57787321 DeaphetS E July 26, 2019, 8:16 a.m. OK GNU C++17 TESTS 67 483 39424000 3500
50417561 dogcdt E Feb. 24, 2019, 7:24 a.m. OK GNU C++17 TESTS 67 483 52531200 3500
44387266 FizzyDavid E Oct. 16, 2018, 6:32 a.m. OK GNU C++17 TESTS 67 483 113561600 3500
57788401 DeaphetS E July 26, 2019, 8:37 a.m. OK GNU C++17 TESTS 67 498 39424000 3500
62914467 gongsuidashen E Oct. 19, 2019, 8:18 a.m. OK GNU C++17 TESTS 67 499 39321600 3500
56772821 GuessYCB E July 9, 2019, 11:56 p.m. OK GNU C++17 TESTS 67 499 40345600 3500
68259654 Ahmad E Jan. 5, 2020, 2:49 p.m. OK Java 8 TESTS 67 1903 208486400 3500

remove filters

Back to search problems