Codeforces Round 649 (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
1364 Codeforces Round 649 (Div. 2) FINISHED False 7200 145292111 June 13, 2020, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1452 ) E X-OR PROGRAMMING bitmasks constructive algorithms interactive probabilities 2700

B'This is an interactive problem! Ehab has a hidden permutation p of length n consisting of the elements from 0 to n-1 . You, for some reason, want to figure out the permutation. To do that, you can give Ehab 2 different indices i and j , and he 'll reply with (p_i|p_j) where | is the bitwise-or operation. Ehab has just enough free time to answer 4269 questions, and while he 's OK with answering that many questions, he 's too lazy to play your silly games, so he 'll fix the permutation beforehand and will not change it depending on your queries. Can you guess the permutation? The only line contains the integer n (3 <= n <= 2048) -- the length of the permutation. To ask a question, print "? i j " (without quotes, i neq j ) Then, you should read the answer, which will be (p_i|p_j) . If we answer with -1 instead of a valid answer, that means you exceeded the number of queries or made an invalid query. Exit immediately after receiving -1 and you will see wrong answer verdict. Otherwise, you can get an arbitrary verdict because your solution will continue to read from a closed stream. To print the answer, print "! p_1 p_2 ldots p_n " (without quotes). Note that answering doesn 't count as one of the 4269 queries. After printing a query or printing the answer, do not forget to output end of line and flush the output. Otherwise, you will get idleness limit exceeded. To do this, use: Hacks: The first line should contain the integer n ( 3 <= n <= 2^{11} ) -- the length of the permutation p . The second line should contain n space-separated integers p_1 , p_2 , ldots , p_n ( 0 <= p_i < n ) -- the elements of the permutation p . In the first sample, the permutation is [1,0,2] . You start by asking about p_1|p_2 and Ehab replies with 1 . You then ask about p_1|p_'...

Tutorials

Codeforces round #649 editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
83694691 rainboy E June 13, 2020, 7:23 p.m. OK GNU C11 TESTS 146 109 0 2700
83709228 Frame233 E June 14, 2020, 2:41 a.m. OK GNU C++11 TESTS 146 62 0 2700
83708391 tzxydby E June 14, 2020, 2:15 a.m. OK GNU C++11 TESTS 146 62 0 2700
83707001 xay5421 E June 14, 2020, 1:22 a.m. OK GNU C++11 TESTS 146 62 102400 2700
83684505 Prabowo E June 13, 2020, 5:38 p.m. OK GNU C++11 TESTS 146 62 204800 2700
83718619 Leachim E June 14, 2020, 5:51 a.m. OK GNU C++11 TESTS 146 62 819200 2700
83708433 vjudge2 E June 14, 2020, 2:16 a.m. OK GNU C++11 TESTS 146 77 0 2700
83691529 frodakcin E June 13, 2020, 6:40 p.m. OK GNU C++11 TESTS 146 77 0 2700
83689628 Koosha_Mv E June 13, 2020, 6:18 p.m. OK GNU C++11 TESTS 146 77 0 2700
83689436 Koosha_Mv E June 13, 2020, 6:16 p.m. OK GNU C++11 TESTS 146 77 0 2700
83709934 Frame233 E June 14, 2020, 2:59 a.m. OK GNU C++11 TESTS 146 77 0 2700
83669371 hepth E June 13, 2020, 4:32 p.m. OK GNU C++14 TESTS 146 77 307200 2700
83703911 cypherop E June 13, 2020, 11:07 p.m. OK GNU C++14 TESTS 146 77 409600 2700
83689455 Muhammad_Hokimiyon E June 13, 2020, 6:16 p.m. OK GNU C++14 TESTS 146 78 307200 2700
83688985 extremum E June 13, 2020, 6:11 p.m. OK GNU C++14 TESTS 146 92 307200 2700
83696152 jk89 E June 13, 2020, 7:45 p.m. OK GNU C++14 TESTS 146 92 716800 2700
83717679 willingox E June 14, 2020, 5:37 a.m. OK GNU C++14 TESTS 146 93 0 2700
83698234 Juanito98 E June 13, 2020, 8:21 p.m. OK GNU C++14 TESTS 146 93 307200 2700
83696740 xb0nS E June 13, 2020, 7:54 p.m. OK GNU C++14 TESTS 146 93 307200 2700
83696639 Charbel11 E June 13, 2020, 7:53 p.m. OK GNU C++14 TESTS 146 93 307200 2700
83706407 retawB E June 14, 2020, 1:01 a.m. OK GNU C++14 TESTS 146 93 307200 2700
83712006 wasa855 E June 14, 2020, 3:51 a.m. OK GNU C++17 TESTS 146 77 102400 2700
83717366 efyjef E June 14, 2020, 5:32 a.m. OK GNU C++17 TESTS 146 77 204800 2700
83703279 Pajaraja E June 13, 2020, 10:41 p.m. OK GNU C++17 TESTS 146 77 307200 2700
83696187 klimoza E June 13, 2020, 7:46 p.m. OK GNU C++17 TESTS 146 77 307200 2700
83689172 ulna E June 13, 2020, 6:13 p.m. OK GNU C++17 TESTS 146 77 307200 2700
83703333 bartek95 E June 13, 2020, 10:43 p.m. OK GNU C++17 TESTS 146 77 307200 2700
83696997 atulyakv E June 13, 2020, 7:58 p.m. OK GNU C++17 TESTS 146 77 409600 2700
83684728 SanyaSaske E June 13, 2020, 5:39 p.m. OK GNU C++17 TESTS 146 77 512000 2700
83686101 kmjp E June 13, 2020, 5:47 p.m. OK GNU C++17 TESTS 146 77 614400 2700
83707693 whd E June 14, 2020, 1:49 a.m. OK GNU C++17 TESTS 146 77 614400 2700
83689799 timf1089 E June 13, 2020, 6:20 p.m. OK GNU C++17 (64) TESTS 146 62 0 2700
83664855 akifpatel E June 13, 2020, 4:20 p.m. OK GNU C++17 (64) TESTS 146 77 0 2700
83688810 Bohun E June 13, 2020, 6:10 p.m. OK GNU C++17 (64) TESTS 146 77 0 2700
83713404 MateoCV E June 14, 2020, 4:19 a.m. OK GNU C++17 (64) TESTS 146 77 204800 2700
83677356 Diego E June 13, 2020, 4:53 p.m. OK GNU C++17 (64) TESTS 146 77 307200 2700
83671382 gamegame E June 13, 2020, 4:37 p.m. OK GNU C++17 (64) TESTS 146 77 4300800 2700
83690680 irri E June 13, 2020, 6:30 p.m. OK GNU C++17 (64) TESTS 146 78 0 2700
83696825 timf1089 E June 13, 2020, 7:55 p.m. OK GNU C++17 (64) TESTS 146 78 102400 2700
83713350 MateoCV E June 14, 2020, 4:18 a.m. OK GNU C++17 (64) TESTS 146 78 204800 2700
83698188 Pandemic E June 13, 2020, 8:20 p.m. OK GNU C++17 (64) TESTS 146 78 409600 2700
83675324 SecondThread E June 13, 2020, 4:48 p.m. OK Java 8 TESTS 146 343 0 2700
83690041 Vince729 E June 13, 2020, 6:23 p.m. OK Java 8 TESTS 146 389 17100800 2700
83690832 sylvyrfysh E June 13, 2020, 6:32 p.m. OK Kotlin TESTS 146 467 1638400 2700
83691428 sylvyrfysh E June 13, 2020, 6:39 p.m. OK Kotlin TESTS 146 467 1638400 2700
83680219 Hakiobo E June 13, 2020, 5 p.m. OK Kotlin TESTS 146 467 20377600 2700
83691312 BpeMeHHa91_TryDHocTb E June 13, 2020, 6:37 p.m. OK MS C++ 2017 TESTS 146 124 409600 2700
83680562 pajenegod E June 13, 2020, 5:01 p.m. OK PyPy 2 TESTS 146 623 10240000 2700
83667455 Bruteforceman E June 13, 2020, 4:26 p.m. OK PyPy 3 TESTS 146 842 13004800 2700
83707223 lucifer1004 E June 14, 2020, 1:31 a.m. OK PyPy 3 TESTS 146 842 13107200 2700
83691616 nwi E June 13, 2020, 6:42 p.m. OK Python 2 TESTS 146 296 409600 2700
83696850 WNG E June 13, 2020, 7:56 p.m. OK Python 3 TESTS 146 249 614400 2700
83689278 sh1194 E June 13, 2020, 6:14 p.m. OK Python 3 TESTS 146 280 1024000 2700
83689086 sh1194 E June 13, 2020, 6:12 p.m. OK Python 3 TESTS 146 280 1024000 2700
83695867 r57shell E June 13, 2020, 7:40 p.m. OK Python 3 TESTS 146 280 1126400 2700
83689569 sh1194 E June 13, 2020, 6:17 p.m. OK Python 3 TESTS 146 296 1126400 2700
83689703 sh1194 E June 13, 2020, 6:19 p.m. OK Python 3 TESTS 146 311 1024000 2700
83670976 sansen E June 13, 2020, 4:36 p.m. OK Rust TESTS 146 155 0 2700

remove filters

Back to search problems