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 |
---|---|---|---|---|---|---|
1854 | Codeforces Round 889 (Div. 1) | FINISHED | False | 9000 | 46538663 | July 29, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 567 ) | D | Michael and Hotel | PROGRAMMING | interactive trees |
B'Michael and Brian are stuck in a hotel with n rooms, numbered from 1 to n , and need to find each other. But this hotel 's doors are all locked and the only way of getting around is by using the teleporters in each room. Room i has a teleporter that will take you to room a_i (it might be that a_i = i ). But they don 't know the values of a_1,a_2, ... , a_n . Instead, they can call up the front desk to ask queries. In one query, they give a room u , a positive integer k , and a set of rooms S . The hotel concierge answers whether a person starting in room u , and using the teleporters k times, ends up in a room in S . Brian is in room 1 . Michael wants to know the set A of rooms so that if he starts in one of those rooms they can use the teleporters to meet up. He can ask at most 2000 queries. The values a_1, a_2, ... , a_n are fixed before the start of the interaction and do not depend on your queries. In other words, the interactor is not adaptive. The input contains a single integer n ( 2 <= q n <= q 500 ). To ask a query, print a line in the format "? u k |S| S_1 S_2 ... S_|S|" with 1 <= q u, S_1, ldots, S_{|S|} <= q n , all the S_i distinct, and 1 <= q k <= q 10^9 . As a response to the query you will get "1" if the answer is yes, and "0" if the answer is no. To output an answer, you should print "! |A| A_1 A_2 ... A_|A|" with 1 <= q A_1, ldots, A_{|A|} <= q n all distinct. Printing the answer doesn 't count as a query. See the interaction example for more clarity. If you ask too many queries or you ask a malformed query, you will get Wrong answer. After printing a query do not forget to output the end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use: Hack format For the hacks use the following format. The first line should contain n -- the number of rooms. The second line sho'... |
Editorial of Codeforces Round 889 (Div. 1 + Div. 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
216394183 | Redpojoe | D | July 30, 2023, 4:33 a.m. | OK | GNU C++14 | TESTS | 110 | 108 | 204800 | ||
216353005 | Potassium | D | July 29, 2023, 6:31 p.m. | OK | GNU C++17 | TESTS | 110 | 77 | 204800 | ||
216351798 | Xtale_cross | D | July 29, 2023, 6:22 p.m. | OK | GNU C++17 | TESTS | 110 | 77 | 204800 | ||
216354081 | panospask | D | July 29, 2023, 6:39 p.m. | OK | GNU C++17 | TESTS | 110 | 78 | 0 | ||
216362450 | Deepesson | D | July 29, 2023, 7:57 p.m. | OK | GNU C++17 | TESTS | 110 | 78 | 614400 | ||
216389611 | 1.618 | D | July 30, 2023, 3:30 a.m. | OK | GNU C++17 | TESTS | 110 | 92 | 204800 | ||
216368486 | EnAnimant | D | July 29, 2023, 9 p.m. | OK | GNU C++17 | TESTS | 110 | 93 | 204800 | ||
216347007 | HOLlC | D | July 29, 2023, 5:54 p.m. | OK | GNU C++17 | TESTS | 108 | 93 | 204800 | ||
216330943 | Um_nik | D | July 29, 2023, 4:49 p.m. | OK | GNU C++17 | TESTS | 108 | 93 | 512000 | ||
216354451 | muratt | D | July 29, 2023, 6:42 p.m. | OK | GNU C++17 | TESTS | 110 | 108 | 6246400 | ||
216345527 | int65536 | D | July 29, 2023, 5:48 p.m. | OK | GNU C++17 | TESTS | 108 | 109 | 204800 | ||
216309763 | Xellos | D | July 29, 2023, 4:11 p.m. | OK | GNU C++17 (64) | TESTS | 108 | 61 | 0 | ||
216351471 | ooOAM | D | July 29, 2023, 6:20 p.m. | OK | GNU C++17 (64) | TESTS | 109 | 62 | 102400 | ||
216390344 | neal | D | July 30, 2023, 3:40 a.m. | OK | GNU C++17 (64) | TESTS | 110 | 77 | 0 | ||
216390266 | neal | D | July 30, 2023, 3:39 a.m. | OK | GNU C++17 (64) | TESTS | 110 | 77 | 0 | ||
216360791 | skittles1412 | D | July 29, 2023, 7:41 p.m. | OK | GNU C++17 (64) | TESTS | 110 | 77 | 0 | ||
216338590 | neal | D | July 29, 2023, 5:01 p.m. | OK | GNU C++17 (64) | TESTS | 108 | 77 | 0 | ||
216308614 | Geothermal | D | July 29, 2023, 4:09 p.m. | OK | GNU C++17 (64) | TESTS | 108 | 77 | 0 | ||
216345453 | ooOAM | D | July 29, 2023, 5:47 p.m. | OK | GNU C++17 (64) | TESTS | 108 | 77 | 102400 | ||
216345403 | ooOAM | D | July 29, 2023, 5:47 p.m. | OK | GNU C++17 (64) | TESTS | 108 | 77 | 102400 | ||
216344920 | ooOAM | D | July 29, 2023, 5:46 p.m. | OK | GNU C++17 (64) | TESTS | 108 | 77 | 102400 | ||
216345106 | maroonrk | D | July 29, 2023, 5:46 p.m. | OK | GNU C++20 (64) | TESTS | 108 | 61 | 102400 | ||
216329430 | potato167 | D | July 29, 2023, 4:46 p.m. | OK | GNU C++20 (64) | TESTS | 108 | 62 | 0 | ||
216321960 | tourist | D | July 29, 2023, 4:32 p.m. | OK | GNU C++20 (64) | TESTS | 108 | 62 | 0 | ||
216379297 | tkacper | D | July 30, 2023, 12:26 a.m. | OK | GNU C++20 (64) | TESTS | 110 | 62 | 102400 | ||
216368233 | Mangooste | D | July 29, 2023, 8:57 p.m. | OK | GNU C++20 (64) | TESTS | 110 | 62 | 102400 | ||
216345647 | maroonrk | D | July 29, 2023, 5:48 p.m. | OK | GNU C++20 (64) | TESTS | 108 | 62 | 102400 | ||
216329615 | 353cerega | D | July 29, 2023, 4:46 p.m. | OK | GNU C++20 (64) | TESTS | 108 | 62 | 102400 | ||
216292360 | ksun48 | D | July 29, 2023, 3:43 p.m. | OK | GNU C++20 (64) | TESTS | 108 | 62 | 102400 | ||
216381145 | SSerxhs | D | July 30, 2023, 1:09 a.m. | OK | GNU C++20 (64) | TESTS | 110 | 77 | 0 | ||
216347964 | Golovanov399 | D | July 29, 2023, 5:59 p.m. | OK | GNU C++20 (64) | TESTS | 108 | 77 | 0 | ||
216332290 | Tlatoani | D | July 29, 2023, 4:51 p.m. | OK | Kotlin 1.6 | TESTS | 108 | 452 | 1638400 | ||
216372744 | conqueror_of_tourist | D | July 29, 2023, 9:59 p.m. | OK | PyPy 3-64 | TESTS | 110 | 280 | 9011200 | ||
216386599 | sansen | D | July 30, 2023, 2:41 a.m. | OK | Rust 2021 | TESTS | 110 | 93 | 307200 | ||
216320691 | sansen | D | July 29, 2023, 4:30 p.m. | OK | Rust 2021 | TESTS | 108 | 139 | 307200 | ||
216335727 | qwerty787788 | D | July 29, 2023, 4:57 p.m. | OK | Rust 2021 | TESTS | 108 | 155 | 102400 |
Back to search problems