Codeforces Round 542 [Alex Lopashev Thanks-Round] (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
1129 Codeforces Round 542 [Alex Lopashev Thanks-Round] (Div. 1) FINISHED False 7200 186416687 Feb. 24, 2019, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 453 ) E Legendary Tree PROGRAMMING binary search interactive trees 3000

B'This is an interactive problem. A legendary tree rests deep in the forest. Legend has it that individuals who realize this tree would eternally become a Legendary Grandmaster. To help you determine the tree, Mikaela the Goddess has revealed to you that the tree contains n vertices, enumerated from 1 through n . She also allows you to ask her some questions as follows. For each question, you should tell Mikaela some two disjoint non-empty sets of vertices S and T , along with any vertex v that you like. Then, Mikaela will count and give you the number of pairs of vertices (s, t) where s in S and t in T such that the simple path from s to t contains v . Mikaela the Goddess is busy and will be available to answer at most 11 ,111 questions. This is your only chance. Your task is to determine the tree and report its edges. The first line contains an integer n ( 2 <= q n <= q 500 ) -- the number of vertices in the tree. When program has realized the tree and is ready to report the edges, print "ANSWER" in a separate line. Make sure that all letters are capitalized. Then, print n-1 lines, each containing two space-separated integers, denoting the vertices that are the endpoints of a certain edge. Each edge should be reported exactly once. Your program should then immediately terminate. For each question that you wish to ask, interact as follows. Be reminded that S and T must be disjoint and non-empty. 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: If your program asks too many questions, asks an invalid question or does not correctly follow the interaction guideline above, it may receive an arbitrary verdict. Otherwise, your program will receive the Wrong Answer verdict if it reports an incorrect tree. Note that the tree is fixed beforehand and does not depend o'...

Tutorials

65520

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50542184 hos.lyric E Feb. 26, 2019, 6:47 p.m. OK D TESTS 200 467 4403200 3000
52648888 rainboy E April 12, 2019, 3:42 p.m. OK GNU C11 TESTS 200 1497 0 3000
50735903 luogu_bot5 E March 3, 2019, 12:54 p.m. OK GNU C++11 TESTS 200 109 0 3000
50478791 shanxizeng E Feb. 25, 2019, 7:46 a.m. OK GNU C++11 TESTS 200 109 2048000 3000
50584581 fzszchy2001 E Feb. 28, 2019, 2:01 a.m. OK GNU C++11 TESTS 200 124 0 3000
50738471 yybyyb E March 3, 2019, 2:03 p.m. OK GNU C++11 TESTS 200 124 0 3000
60752582 ZUTTER_ E Sept. 18, 2019, 7:12 a.m. OK GNU C++11 TESTS 200 124 16076800 3000
50777353 luogu_bot1 E March 4, 2019, 9:20 a.m. OK GNU C++11 TESTS 200 139 0 3000
50589807 1592063346 E Feb. 28, 2019, 6:43 a.m. OK GNU C++11 TESTS 200 139 102400 3000
51149628 litble E March 11, 2019, 6:45 a.m. OK GNU C++11 TESTS 200 140 0 3000
50560147 chaojidouding E Feb. 27, 2019, 10:30 a.m. OK GNU C++11 TESTS 200 140 102400 3000
52676063 KMAASZRAA E April 13, 2019, 9:40 a.m. OK GNU C++11 TESTS 200 140 102400 3000
50513509 tmwilliamlin168 E Feb. 26, 2019, 4:04 a.m. OK GNU C++14 TESTS 200 139 204800 3000
58506175 Arg_007 E Aug. 9, 2019, 4:33 p.m. OK GNU C++14 TESTS 200 139 1433600 3000
50690766 ghh123456 E March 2, 2019, 3:35 p.m. OK GNU C++14 TESTS 200 155 0 3000
50554658 mayaohua2003 E Feb. 27, 2019, 7:12 a.m. OK GNU C++14 TESTS 200 155 0 3000
52490195 BestMSN E April 8, 2019, 11:17 a.m. OK GNU C++14 TESTS 200 155 204800 3000
50550104 alan_cty E Feb. 27, 2019, 3:11 a.m. OK GNU C++14 TESTS 200 155 204800 3000
50588031 eidan E Feb. 28, 2019, 5:29 a.m. OK GNU C++14 TESTS 200 170 307200 3000
51559107 yasugongshang E March 20, 2019, 7:12 a.m. OK GNU C++14 TESTS 200 170 307200 3000
51269842 s1dor E March 13, 2019, 5:27 p.m. OK GNU C++14 TESTS 200 171 0 3000
52490274 BestMSN E April 8, 2019, 11:19 a.m. OK GNU C++14 TESTS 200 171 204800 3000
54935647 bmerry E June 1, 2019, 3:51 p.m. OK GNU C++17 TESTS 200 108 204800 3000
62174058 disposrestfuIly E Oct. 9, 2019, 2:58 a.m. OK GNU C++17 TESTS 200 124 0 3000
62069012 user202729_ E Oct. 7, 2019, 4:08 p.m. OK GNU C++17 TESTS 200 139 102400 3000
50511721 aryanc403 E Feb. 26, 2019, 1:39 a.m. OK GNU C++17 TESTS 200 139 204800 3000
50582921 kefaa2 E Feb. 27, 2019, 11:39 p.m. OK GNU C++17 TESTS 200 139 2150400 3000
51051399 Charlene_Hao E March 8, 2019, 9:24 p.m. OK GNU C++17 TESTS 200 140 204800 3000
50455688 V--o_o--V E Feb. 24, 2019, 5:06 p.m. OK GNU C++17 TESTS 200 155 204800 3000
50491182 yzyyylx E Feb. 25, 2019, 1:22 p.m. OK GNU C++17 TESTS 200 155 204800 3000
50582960 kefaa2 E Feb. 27, 2019, 11:43 p.m. OK GNU C++17 TESTS 200 155 2150400 3000
50512231 saketh E Feb. 26, 2019, 2:22 a.m. OK GNU C++17 TESTS 200 170 307200 3000
50984916 platypus179 E March 7, 2019, 7:06 p.m. OK Java 8 TESTS 200 997 0 3000
52648887 Dukkha E April 12, 2019, 3:42 p.m. OK Java 8 TESTS 200 1965 0 3000
51983564 hld67890 E March 29, 2019, 5:26 p.m. OK MS C++ 2017 TESTS 200 280 0 3000
50606017 QAQAutoMaton E Feb. 28, 2019, 2:35 p.m. OK PyPy 3 TESTS 200 1231 9420800 3000

remove filters

Back to search problems