Codeforces Round 563 (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
1174 Codeforces Round 563 (Div. 2) FINISHED False 7200 172252499 June 3, 2019, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1733 ) F Ehab and the Big Finale PROGRAMMING constructive algorithms divide and conquer graphs implementation interactive trees 2300

B'This is an interactive problem. You 're given a tree consisting of n nodes, rooted at node 1 . A tree is a connected graph with no cycles. We chose a hidden node x . In order to find this node, you can ask queries of two types: Node a is called an ancestor of node b if a ne b and the shortest path from node 1 to node b passes through node a . Note that in this problem a node is not an ancestor of itself. Can you find x in no more than 36 queries? The hidden node is fixed in each test beforehand and does not depend on your queries. The first line contains the integer n ( 2 <= n <= 2 cdot 10^5 ) -- the number of nodes in the tree. Each of the next n-1 lines contains two space-separated integers u and v ( 1 <= u,v <= n ) that mean there 's an edge between nodes u and v . It 's guaranteed that the given graph is a tree. To print the answer, print "! x" (without quotes). To ask a question, print it in one of the formats above: After each question, you should read the answer: either the distance or the second vertex on the path, as mentioned in the legend. If we answer with -1 instead of a valid answer, that means you exceeded the number of queries, made an invalid query, or violated the condition in the second type of queries. Exit immediately after receiving -1 and you will see Wrong answer verdict. Otherwise, you can get an arbitrary verdict because your solution will continue to read from a closed stream. After printing a query, do not forget to output end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use: Hacks: The first line should contain two integers n and x ( 2 <= n <= 2 cdot 10^5 , 1 <= x <= n ). Each of the next n-1 lines should contain two integers u and v ( 1 <= u,v <= n ) that mean there is an edge between nodes u and v$$'...

Tutorials

Codeforces round #563 editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55035261 rainboy F June 3, 2019, 2:45 p.m. OK GNU C11 TESTS 123 358 17612800 2300
55118328 libra9z F June 5, 2019, 9:46 a.m. OK GNU C11 TESTS 123 405 20787200 2300
68704622 JasonLan F Jan. 13, 2020, 10:47 a.m. OK GNU C++11 TESTS 123 342 13619200 2300
55416388 siruiyang_sry F June 11, 2019, 2:46 a.m. OK GNU C++11 TESTS 123 343 18432000 2300
55420903 luogu_bot2 F June 11, 2019, 6:24 a.m. OK GNU C++11 TESTS 123 358 15052800 2300
55417507 wucstdio F June 11, 2019, 3:47 a.m. OK GNU C++11 TESTS 123 358 15052800 2300
55610562 ReaLNero1 F June 16, 2019, 5:24 a.m. OK GNU C++11 TESTS 123 358 16076800 2300
55073861 Hazyknight F June 4, 2019, 7:36 a.m. OK GNU C++11 TESTS 123 373 12800000 2300
55545232 Houston-Rockets F June 14, 2019, 1:27 a.m. OK GNU C++11 TESTS 123 373 15052800 2300
55069538 lzoilxy F June 4, 2019, 5:37 a.m. OK GNU C++11 TESTS 123 373 15974400 2300
56294572 nantf F June 30, 2019, 4:46 a.m. OK GNU C++11 TESTS 123 373 17612800 2300
55090562 z13579 F June 4, 2019, 2:21 p.m. OK GNU C++11 TESTS 123 373 21606400 2300
55042759 step_by_step F June 3, 2019, 3:21 p.m. OK GNU C++14 TESTS 123 421 20172800 2300
55098019 DimmyT F June 4, 2019, 6:20 p.m. OK GNU C++14 TESTS 123 421 30412800 2300
56954729 wh_ZH F July 13, 2019, 4:03 a.m. OK GNU C++14 TESTS 123 436 10649600 2300
59660202 lzoiexplorer2004 F Aug. 29, 2019, 12:10 p.m. OK GNU C++14 TESTS 123 436 30412800 2300
56828975 vjudge4 F July 11, 2019, 6:06 a.m. OK GNU C++14 TESTS 123 451 30412800 2300
55066383 qwest F June 4, 2019, 3:50 a.m. OK GNU C++14 TESTS 123 452 15257600 2300
59070831 Azrael142857 F Aug. 19, 2019, 4:38 a.m. OK GNU C++14 TESTS 123 452 19148800 2300
55068554 AsleepAdhyyan F June 4, 2019, 5:08 a.m. OK GNU C++14 TESTS 123 452 20992000 2300
55074819 zhanggengchen F June 4, 2019, 8:04 a.m. OK GNU C++14 TESTS 123 452 23654400 2300
55042488 _rs_ F June 3, 2019, 3:19 p.m. OK GNU C++14 TESTS 123 452 34201600 2300
56296011 congmingyige F June 30, 2019, 5:57 a.m. OK GNU C++17 TESTS 123 436 16179200 2300
55126454 llbra9z F June 5, 2019, 1:04 p.m. OK GNU C++17 TESTS 123 436 20787200 2300
55041698 1207koo F June 3, 2019, 3:15 p.m. OK GNU C++17 TESTS 123 436 20992000 2300
55063945 2683331518 F June 4, 2019, 2:03 a.m. OK GNU C++17 TESTS 123 436 33689600 2300
55067612 qhqh F June 4, 2019, 4:37 a.m. OK GNU C++17 TESTS 123 451 17612800 2300
64724446 Jiburiru F Nov. 12, 2019, 5:51 a.m. OK GNU C++17 TESTS 123 451 18636800 2300
55058205 Rahul F June 3, 2019, 8:11 p.m. OK GNU C++17 TESTS 123 451 22630400 2300
55614784 AlFlen F June 16, 2019, 8:14 a.m. OK GNU C++17 TESTS 123 451 33484800 2300
55042899 ogo F June 3, 2019, 3:22 p.m. OK GNU C++17 TESTS 123 452 12083200 2300
55114534 Houbunsha F June 5, 2019, 8:02 a.m. OK GNU C++17 TESTS 123 452 16793600 2300
55065241 Ahmed_Diab F June 4, 2019, 3:05 a.m. OK Java 8 TESTS 123 810 17715200 2300
55180669 BaZ_ F June 5, 2019, 9:54 p.m. OK Java 8 TESTS 123 826 76390400 2300
55134088 nmakeenkov F June 5, 2019, 2:44 p.m. OK Java 8 TESTS 123 873 58982400 2300
55113815 KharYusuf F June 5, 2019, 7:41 a.m. OK Java 8 TESTS 123 873 68608000 2300
55048991 uwi F June 3, 2019, 3:59 p.m. OK Java 8 TESTS 123 888 9318400 2300
55099213 kukreja-vlk F June 4, 2019, 7:03 p.m. OK Java 8 TESTS 123 950 81408000 2300
55174633 ZeyadKhattab F June 5, 2019, 6:06 p.m. OK Java 8 TESTS 123 966 56729600 2300
55100131 kukreja-vlk F June 4, 2019, 7:36 p.m. OK Java 8 TESTS 123 966 81408000 2300
55044418 dalt F June 3, 2019, 3:30 p.m. OK Java 8 TESTS 123 982 35840000 2300
55173887 ZeyadKhattab F June 5, 2019, 5:50 p.m. OK Java 8 TESTS 123 1014 56627200 2300
55122224 eki F June 5, 2019, 11:15 a.m. OK Mono C# TESTS 123 935 37171200 2300
62915520 omikad F Oct. 19, 2019, 8:34 a.m. OK Mono C# TESTS 123 1138 171929600 2300
55164527 misha2004.ul F June 5, 2019, 4:18 p.m. OK MS C++ 2017 TESTS 123 498 13824000 2300
55648513 Megalitum F June 16, 2019, 1:24 p.m. OK MS C++ 2017 TESTS 123 592 13107200 2300
55127937 FatXi F June 5, 2019, 1:45 p.m. OK MS C++ 2017 TESTS 123 608 18227200 2300
55217826 Stepavly F June 6, 2019, 5:43 p.m. OK MS C++ 2017 TESTS 123 686 15257600 2300
55085444 nwi F June 4, 2019, 12:24 p.m. OK Python 2 TESTS 123 1887 38912000 2300
55113160 whatshisbucket F June 5, 2019, 7:23 a.m. OK Python 3 TESTS 123 1450 44646400 2300
55054163 kobae964 F June 3, 2019, 6:19 p.m. OK Rust TESTS 123 545 21913600 2300
55074358 yakamoto F June 4, 2019, 7:50 a.m. OK Scala TESTS 123 1107 15155200 2300

remove filters

Back to search problems