Codeforces Round 761 (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
1617 Codeforces Round 761 (Div. 2) FINISHED False 7200 97604663 Dec. 16, 2021, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1836 ) D2 Too Many Impostors (hard version) PROGRAMMING constructive algorithms interactive

B'This is an interactive problem. The only difference between the easy and hard version is the limit on number of questions. There are n players labelled from 1 to n . It is guaranteed that n is a multiple of 3 . Among them, there are k impostors and n-k crewmates. The number of impostors, k , is not given to you. It is guaranteed that frac{n}{3} < k < frac{2n}{3} . In each question, you can choose three distinct integers a , b , c ( 1 <= a, b, c <= n ) and ask: "Among the players labelled a , b and c , are there more impostors or more crewmates?" You will be given the integer 0 if there are more impostors than crewmates, and 1 otherwise. Find the number of impostors k and the indices of players that are impostors after asking at most n+6 questions. The jury is adaptive, which means the indices of impostors may not be fixed beforehand and can depend on your questions. It is guaranteed that there is at least one set of impostors which fulfills the constraints and the answers to your questions at any time. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 100 ). Description of the test cases follows. The first and only line of each test case contains a single integer n ( 6 <= n < 10^4 , n is a multiple of 3 ) -- the number of players. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^4 . For each test case, the interaction starts with reading n . Then you are allowed to make at most n+6 questions in the following way: "? a b c" ( 1 <= a, b, c <= n , a , b and c are pairwise distinct). After each one, you should read an integer r , which is equal to 0 if there are more impostors than crewmates among players labelled a , b and c , and equal to 1 otherwise'...

Tutorials

Editorial for Codeforces Round #761 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
139553709 lddlinan D2 Dec. 16, 2021, 4:25 p.m. OK GNU C11 TESTS 48 171 0
139601248 RealArtist D2 Dec. 17, 2021, 5:29 a.m. OK GNU C11 TESTS 48 202 0
139600796 Toby-Shi D2 Dec. 17, 2021, 5:21 a.m. OK GNU C++14 TESTS 48 124 0
139551650 davi0015 D2 Dec. 16, 2021, 4:12 p.m. OK GNU C++14 TESTS 48 124 307200
139599318 0wuming0 D2 Dec. 17, 2021, 4:58 a.m. OK GNU C++14 TESTS 48 124 307200
139589006 zqyyy D2 Dec. 17, 2021, 12:44 a.m. OK GNU C++14 TESTS 48 124 307200
139576854 ducthang30102005 D2 Dec. 16, 2021, 9:12 p.m. OK GNU C++14 TESTS 48 124 307200
139551899 NeverGonnaKnowWhoAmI D2 Dec. 16, 2021, 4:14 p.m. OK GNU C++14 TESTS 48 124 512000
139597174 anixai D2 Dec. 17, 2021, 4:20 a.m. OK GNU C++14 TESTS 48 124 1024000
139561355 RocketCider D2 Dec. 16, 2021, 5:30 p.m. OK GNU C++14 TESTS 48 124 1228800
139594433 shengrang D2 Dec. 17, 2021, 3:25 a.m. OK GNU C++14 TESTS 48 139 204800
139549341 Darko1227 D2 Dec. 16, 2021, 4:02 p.m. OK GNU C++14 TESTS 48 140 0
139550163 Rebro2 D2 Dec. 16, 2021, 4:06 p.m. OK GNU C++17 TESTS 48 93 307200
139578703 NegaTeeF D2 Dec. 16, 2021, 10:02 p.m. OK GNU C++17 TESTS 48 108 307200
139567684 vivaldi370 D2 Dec. 16, 2021, 6:40 p.m. OK GNU C++17 TESTS 48 109 307200
139575947 El-Nebo D2 Dec. 16, 2021, 8:51 p.m. OK GNU C++17 TESTS 48 109 307200
139593830 AvinashKartik D2 Dec. 17, 2021, 3:10 a.m. OK GNU C++17 TESTS 48 124 0
139554982 Nisanth D2 Dec. 16, 2021, 4:33 p.m. OK GNU C++17 TESTS 48 124 102400
139595252 ags6699 D2 Dec. 17, 2021, 3:43 a.m. OK GNU C++17 TESTS 48 124 204800
139554040 T500 D2 Dec. 16, 2021, 4:27 p.m. OK GNU C++17 TESTS 48 124 204800
139554009 avi0000 D2 Dec. 16, 2021, 4:27 p.m. OK GNU C++17 TESTS 48 124 204800
139601635 pavankalyanpallapolu D2 Dec. 17, 2021, 5:35 a.m. OK GNU C++17 TESTS 48 124 204800
139574136 SherMad D2 Dec. 16, 2021, 8:14 p.m. OK GNU C++17 (64) TESTS 48 78 204800
139591924 froggyzhang D2 Dec. 17, 2021, 2:21 a.m. OK GNU C++17 (64) TESTS 48 108 204800
139578275 raj19084 D2 Dec. 16, 2021, 9:48 p.m. OK GNU C++17 (64) TESTS 48 108 204800
139577407 rajkumar19084 D2 Dec. 16, 2021, 9:25 p.m. OK GNU C++17 (64) TESTS 48 108 204800
139549962 altair_codf D2 Dec. 16, 2021, 4:04 p.m. OK GNU C++17 (64) TESTS 48 109 102400
139572440 naman1601 D2 Dec. 16, 2021, 7:48 p.m. OK GNU C++17 (64) TESTS 48 109 204800
139582431 fxhd D2 Dec. 17, 2021, 12:25 a.m. OK GNU C++17 (64) TESTS 48 124 102400
139601852 iNx D2 Dec. 17, 2021, 5:38 a.m. OK GNU C++17 (64) TESTS 48 124 102400
139594145 wsyear D2 Dec. 17, 2021, 3:18 a.m. OK GNU C++17 (64) TESTS 48 124 102400
139578643 TimeWarp101 D2 Dec. 16, 2021, 10 p.m. OK GNU C++17 (64) TESTS 48 124 102400
139562211 lmnopqrst D2 Dec. 16, 2021, 5:39 p.m. OK GNU C++20 (64) TESTS 48 93 102400
139574478 _swet D2 Dec. 16, 2021, 8:20 p.m. OK GNU C++20 (64) TESTS 48 93 102400
139568448 LoNgLoNgDoUblE D2 Dec. 16, 2021, 6:51 p.m. OK GNU C++20 (64) TESTS 48 93 204800
139574256 Beas D2 Dec. 16, 2021, 8:16 p.m. OK GNU C++20 (64) TESTS 48 108 204800
139551512 harsh__h D2 Dec. 16, 2021, 4:12 p.m. OK GNU C++20 (64) TESTS 48 108 409600
139555788 irri D2 Dec. 16, 2021, 4:39 p.m. OK GNU C++20 (64) TESTS 48 109 102400
139555597 Dragonado D2 Dec. 16, 2021, 4:38 p.m. OK GNU C++20 (64) TESTS 48 109 307200
139545715 Tekor D2 Dec. 16, 2021, 3:31 p.m. OK GNU C++20 (64) TESTS 48 109 1638400
139550367 Shrimp__ D2 Dec. 16, 2021, 4:06 p.m. OK GNU C++20 (64) TESTS 48 124 0
139597790 PigeonG D2 Dec. 17, 2021, 4:32 a.m. OK GNU C++20 (64) TESTS 48 124 102400
139546196 0x3F D2 Dec. 16, 2021, 3:32 p.m. OK Go TESTS 48 187 819200
139559457 podtelkin D2 Dec. 16, 2021, 5:11 p.m. OK Java 11 TESTS 48 811 2457600
139550377 nick_301 D2 Dec. 16, 2021, 4:07 p.m. OK Java 11 TESTS 48 826 5222400
139574182 golions D2 Dec. 16, 2021, 8:15 p.m. OK Java 8 TESTS 48 639 0
139576736 NatInTheHat D2 Dec. 16, 2021, 9:09 p.m. OK Java 8 TESTS 48 794 0
139545368 Eldies D2 Dec. 16, 2021, 3:31 p.m. OK MS C++ 2017 TESTS 48 202 102400
139581221 mban259 D2 Dec. 16, 2021, 11:35 p.m. OK .NET Core C# TESTS 48 311 3993600
139552276 megurine D2 Dec. 16, 2021, 4:16 p.m. OK PyPy 3 TESTS 48 732 9830400
139564243 iimmortal D2 Dec. 16, 2021, 6:02 p.m. OK PyPy 3 TESTS 48 795 9830400
139557796 hxu10 D2 Dec. 16, 2021, 4:56 p.m. OK PyPy 3 TESTS 48 1045 11059200
139597224 coolstreaming D2 Dec. 17, 2021, 4:21 a.m. OK PyPy 3-64 TESTS 48 623 8601600
139555326 shotoyoo D2 Dec. 16, 2021, 4:36 p.m. OK PyPy 3-64 TESTS 48 733 12288000
139554558 Shisuko D2 Dec. 16, 2021, 4:31 p.m. OK Python 3 TESTS 48 436 614400
139561175 apilat D2 Dec. 16, 2021, 5:28 p.m. OK Rust 2021 TESTS 48 264 307200
139553850 katand D2 Dec. 16, 2021, 4:26 p.m. OK Rust 2021 TESTS 48 280 307200
139601932 katand D2 Dec. 17, 2021, 5:39 a.m. OK Rust 2021 TESTS 48 295 307200
139601092 katand D2 Dec. 17, 2021, 5:26 a.m. OK Rust 2021 TESTS 48 295 512000

remove filters

Back to search problems