Codeforces Round 682 (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
1438 Codeforces Round 682 (Div. 2) FINISHED False 7200 131901863 Nov. 13, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 651 ) F Olha and Igor PROGRAMMING interactive trees

B'This is an interactive problem. Igor wants to find the key to Olha 's heart. The problem is, that it 's at the root of a binary tree. There is a perfect binary tree of height h consisting of n = 2^{h} - 1 nodes. The nodes have been assigned distinct labels from 1 to n . However, Igor only knows h and does not know which label corresponds to which node. To find key to Olha 's heart he needs to find the label assigned to the root by making queries of the following type at most n+420 times: Help Igor to find the root! Note: the grader is not adaptive: the labels are fixed before any queries are made. The first and only line contains a single integer h ( 3 <= h <= 18 ) -- the height of the tree. You begin the interaction by reading h . To make a query for labels u, v, w , in a separate line output "? u v w". Numbers in the query have to satisfy 1 <= u, v, w <= n . Additionally, u ne v , u ne w , and v ne w . In response, you will receive 1 <= x <= n , the label of the lowest common ancestor of u and v , if the tree was rooted at w . In case your query is invalid or you asked more than n+420 queries, program will print -1 and will finish interaction. You will receive Wrong answer verdict. Make sure to exit immediately to avoid getting other verdicts. When you determine the label assigned to the root, output "! r", where r is the label of the root. 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: Hack Format To hack, use the following format. The first line should contain a single integer h (height of the binary tree). On the next line, output a permutation p of size n = 2^h - 1 . This represents a binary tree where the root is labelled p_1 and for 1 < i <= n , the parent of p_i is p_{ lfloor{ frac{i}{2}'...

Tutorials

Codeforces Round #682 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
98314306 Maksim1744 F Nov. 13, 2020, 3:46 p.m. OK GNU C11 TESTS 49 1872 2150400
98332063 rainboy F Nov. 13, 2020, 7:02 p.m. OK GNU C11 TESTS 49 2027 1024000
98332041 rainboy F Nov. 13, 2020, 7:02 p.m. OK GNU C11 TESTS 49 2105 1024000
98353331 huanggs F Nov. 14, 2020, 5:48 a.m. OK GNU C++11 TESTS 49 1107 1024000
98341500 zzkkaiming F Nov. 14, 2020, 12:10 a.m. OK GNU C++11 TESTS 49 1200 12083200
98350784 OMG_link F Nov. 14, 2020, 4:53 a.m. OK GNU C++11 TESTS 49 1201 2969600
98350010 socho F Nov. 14, 2020, 4:32 a.m. OK GNU C++14 TESTS 49 1887 204800
98339116 PavelChadnov F Nov. 13, 2020, 10:07 p.m. OK GNU C++14 TESTS 49 1887 2150400
98345547 kmjp F Nov. 14, 2020, 2:34 a.m. OK GNU C++14 TESTS 49 2121 5324800
98330197 Danzev F Nov. 13, 2020, 6:30 p.m. OK GNU C++14 TESTS 49 2167 102400
98331826 A_U_I F Nov. 13, 2020, 6:58 p.m. OK GNU C++14 TESTS 49 2167 204800
98339868 limabeans F Nov. 13, 2020, 10:47 p.m. OK GNU C++17 TESTS 49 1544 204800
98345917 generic_placeholder_name F Nov. 14, 2020, 2:44 a.m. OK GNU C++17 TESTS 49 1824 1024000
98331487 Igorjan94 F Nov. 13, 2020, 6:52 p.m. OK GNU C++17 TESTS 49 1855 10342400
98347860 AlexFetisov F Nov. 14, 2020, 3:34 a.m. OK GNU C++17 TESTS 49 1918 1024000
98312475 peti1234 F Nov. 13, 2020, 3:39 p.m. OK GNU C++17 TESTS 49 1918 1536000
98331688 Igorjan94 F Nov. 13, 2020, 6:55 p.m. OK GNU C++17 TESTS 49 1934 204800
98348530 tsyr8924503 F Nov. 14, 2020, 3:51 a.m. OK GNU C++17 TESTS 49 1934 7987200
98319461 00000010100001100111 F Nov. 13, 2020, 4:11 p.m. OK GNU C++17 TESTS 49 1965 204800
98328248 fedoseev.timofey F Nov. 13, 2020, 6:02 p.m. OK GNU C++17 TESTS 49 1980 2150400
98347426 Forever_Pursuit F Nov. 14, 2020, 3:22 a.m. OK GNU C++17 TESTS 49 1980 3174400
98320222 noimi F Nov. 13, 2020, 4:15 p.m. OK GNU C++17 (64) TESTS 49 1575 0
98330986 IgorI F Nov. 13, 2020, 6:43 p.m. OK GNU C++17 (64) TESTS 49 1621 2150400
98337399 wrinx F Nov. 13, 2020, 9:01 p.m. OK GNU C++17 (64) TESTS 49 1669 9523200
98348612 hitonanode F Nov. 14, 2020, 3:53 a.m. OK GNU C++17 (64) TESTS 49 1731 4198400
98333591 Fly_37 F Nov. 13, 2020, 7:31 p.m. OK GNU C++17 (64) TESTS 49 1762 0
98337753 Siberian F Nov. 13, 2020, 9:13 p.m. OK GNU C++17 (64) TESTS 49 1794 2150400
98329208 saketh F Nov. 13, 2020, 6:14 p.m. OK GNU C++17 (64) TESTS 49 1933 1024000
98346440 wasa855 F Nov. 14, 2020, 2:57 a.m. OK GNU C++17 (64) TESTS 49 1949 3993600
98320347 A_Le_K F Nov. 13, 2020, 4:16 p.m. OK GNU C++17 (64) TESTS 49 1965 0
98329227 saketh F Nov. 13, 2020, 6:15 p.m. OK GNU C++17 (64) TESTS 49 1981 1024000
98315487 Tlatoani F Nov. 13, 2020, 3:52 p.m. OK Kotlin TESTS 49 2776 8396800
98332683 noncomlp F Nov. 13, 2020, 7:12 p.m. OK PyPy 3 TESTS 49 1715 35942400
98332712 noncomlp F Nov. 13, 2020, 7:13 p.m. OK PyPy 3 TESTS 49 1715 36352000
98332339 noncomlp F Nov. 13, 2020, 7:07 p.m. OK PyPy 3 TESTS 49 1778 36147200
98339662 silvertint F Nov. 13, 2020, 10:35 p.m. OK PyPy 3 TESTS 49 3744 12595200
98339404 silvertint F Nov. 13, 2020, 10:22 p.m. OK Python 3 TESTS 49 3868 5939200

remove filters

Back to search problems