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 |
---|---|---|---|---|---|---|
1158 | Codeforces Round 559 (Div. 1) | FINISHED | False | 7200 | 179853923 | May 12, 2019, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 154 ) | E | Strange device | PROGRAMMING | binary search interactive math trees | 3300 |
B'It is an interactive problem. Vasya enjoys solving quizzes. He found a strange device and wants to know how it works. This device encrypted with the tree (connected undirected graph without cycles) with n vertices, numbered with integers from 1 to n . To solve this quiz you should guess this tree. Fortunately, this device can make one operation, using which you should guess the cipher. You can give the device an array d_1, d_2, ldots, d_n of non-negative integers. On the device, there are n lamps, i -th of them is connected with i -th vertex of the tree. For all i the light will turn on the i -th lamp, if there exist such vertex of the tree with number j neq i that dist(i, j) <= q d_j . Let 's define dist(i, j) as the distance between vertices i and j in tree or number of edges on the simple path between vertices i and j . Vasya wants to solve this quiz using <= q 80 operations with the device and guess the tree. Help him! In the beginning, your program should read one integer n -- the number of vertices of the tree which encrypts the device ( 2 <= q n <= q 1000 ). After that, you can make several operations in the following format. To do operation print a symbol"?" (without quotes) and n integers d_1, d_2, ldots, d_n , separated by spaces after it. Please note, that for all i you can only use the numbers, satisfying the inequality 0 <= q d_i < n . After that, you should read a string s with length n , consisting of symbols "0" and "1" (without quotes). For all i the symbol s_i is equal to "0", if the lamp on the device, connected with i -th vertex of the tree is switched off and "1" otherwise. After several operations, you should print guessed tree. To do it print the only symbol "!" (without quotes). In the next n-1 lines print 2 integers a_i , b_i -- indexes of the verti'... |
66993 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
55288941 | _twilight | E | June 8, 2019, 6:40 a.m. | OK | GNU C++11 | TESTS | 100 | 46 | 204800 | 3300 | |
55011204 | nekochen | E | June 3, 2019, 10:06 a.m. | OK | GNU C++11 | TESTS | 100 | 61 | 102400 | 3300 | |
54225662 | frodakcin | E | May 16, 2019, 6:09 a.m. | OK | GNU C++11 | TESTS | 100 | 62 | 45260800 | 3300 | |
55285281 | _twilight | E | June 8, 2019, 4:27 a.m. | OK | GNU C++11 | TESTS | 100 | 77 | 102400 | 3300 | |
58049807 | AloneKnight | E | July 31, 2019, 2:06 a.m. | OK | GNU C++11 | TESTS | 100 | 77 | 409600 | 3300 | |
57710172 | py_ultron | E | July 24, 2019, 11:08 p.m. | OK | GNU C++11 | TESTS | 100 | 78 | 102400 | 3300 | |
54526143 | samjia2000 | E | May 23, 2019, 2:36 p.m. | OK | GNU C++11 | TESTS | 100 | 78 | 409600 | 3300 | |
54523210 | dani1373 | E | May 23, 2019, 1:14 p.m. | OK | GNU C++11 | TESTS | 100 | 93 | 102400 | 3300 | |
65727928 | lzoiexplorer2004 | E | Nov. 26, 2019, 2 a.m. | OK | GNU C++11 | TESTS | 100 | 93 | 204800 | 3300 | |
57866061 | lopare | E | July 27, 2019, 9:06 p.m. | OK | GNU C++11 | TESTS | 100 | 109 | 102400 | 3300 | |
54420549 | E.Space | E | May 20, 2019, 3:10 p.m. | OK | GNU C++14 | TESTS | 100 | 31 | 204800 | 3300 | |
54419804 | E.Space | E | May 20, 2019, 2:46 p.m. | OK | GNU C++14 | TESTS | 100 | 31 | 204800 | 3300 | |
63897861 | Scut82 | E | Oct. 31, 2019, 3:21 a.m. | OK | GNU C++14 | TESTS | 100 | 46 | 204800 | 3300 | |
55610931 | ReaLNero1 | E | June 16, 2019, 5:40 a.m. | OK | GNU C++14 | TESTS | 100 | 46 | 204800 | 3300 | |
54549596 | yasugongshang | E | May 24, 2019, 8:18 a.m. | OK | GNU C++14 | TESTS | 100 | 46 | 204800 | 3300 | |
61985848 | Toxel | E | Oct. 6, 2019, 1:31 p.m. | OK | GNU C++14 | TESTS | 100 | 46 | 307200 | 3300 | |
58568856 | Libitina | E | Aug. 11, 2019, 9:09 a.m. | OK | GNU C++14 | TESTS | 100 | 46 | 409600 | 3300 | |
54518028 | dujvet | E | May 23, 2019, 10:57 a.m. | OK | GNU C++14 | TESTS | 100 | 46 | 409600 | 3300 | |
54440050 | FizzyDavid | E | May 21, 2019, 8:08 a.m. | OK | GNU C++14 | TESTS | 100 | 46 | 409600 | 3300 | |
54446982 | rainy_season | E | May 21, 2019, 11:48 a.m. | OK | GNU C++14 | TESTS | 100 | 61 | 307200 | 3300 | |
69707680 | gongsuidashen | E | Jan. 29, 2020, 5:32 a.m. | OK | GNU C++17 | TESTS | 100 | 46 | 204800 | 3300 | |
54470948 | burhonbaqoyev | E | May 22, 2019, 5:25 a.m. | OK | GNU C++17 | TESTS | 100 | 46 | 204800 | 3300 | |
54379327 | mayaohua2003 | E | May 19, 2019, 10:12 a.m. | OK | GNU C++17 | TESTS | 100 | 46 | 204800 | 3300 | |
67583984 | user202729_ | E | Dec. 25, 2019, 7:28 a.m. | OK | GNU C++17 | TESTS | 100 | 46 | 307200 | 3300 | |
58700164 | superguyjm | E | Aug. 13, 2019, 7:32 a.m. | OK | GNU C++17 | TESTS | 100 | 46 | 307200 | 3300 | |
54745285 | amarDhcuMoS | E | May 28, 2019, 10:14 a.m. | OK | GNU C++17 | TESTS | 100 | 46 | 307200 | 3300 | |
54065295 | saketh | E | May 13, 2019, 1:09 p.m. | OK | GNU C++17 | TESTS | 100 | 46 | 307200 | 3300 | |
54045364 | ainta | E | May 12, 2019, 4:30 p.m. | OK | GNU C++17 | TESTS | 100 | 46 | 4300800 | 3300 | |
54414862 | Farhod_Farmon | E | May 20, 2019, noon | OK | GNU C++17 | TESTS | 100 | 46 | 4403200 | 3300 | |
54177539 | alexander86 | E | May 15, 2019, 2:28 p.m. | OK | GNU C++17 | TESTS | 100 | 61 | 307200 | 3300 | |
54486948 | dalt | E | May 22, 2019, 1:34 p.m. | OK | Java 8 | TESTS | 100 | 155 | 0 | 3300 | |
54535116 | mmaxio | E | May 23, 2019, 7:32 p.m. | OK | Java 8 | TESTS | 100 | 170 | 0 | 3300 |
Back to search problems