Codeforces Round 888 (Div. 3)

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
1851 Codeforces Round 888 (Div. 3) FINISHED False 8100 46884263 July 25, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6114 ) F Lisa and the Martians PROGRAMMING bitmasks data structures greedy math sortings strings trees

B"Lisa was kidnapped by martians! It okay, because she has watched a lot of TV shows about aliens, so she knows what awaits her. Let's call integer martian if it is a non-negative integer and strictly less than 2^k , for example, when k = 12 , the numbers 51 , 1960 , 0 are martian, and the numbers pi , -1 , frac{21}{8} , 4096 are not. The aliens will give Lisa n martian numbers a_1, a_2, ldots, a_n . Then they will ask her to name any martian number x . After that, Lisa will select a pair of numbers a_i, a_j ( i neq j ) in the given sequence and count (a_i oplus x) & (a_j oplus x) . The operation oplus means Bitwise exclusive OR, the operation & means Bitwise And. For example, (5 oplus 17) & (23 oplus 17) = (00101_2 oplus 10001_2) & (10111_2 oplus 10001_2) = 10100_2 & 00110_2 = 00100_2 = 4 . Lisa is sure that the higher the calculated value, the higher her chances of returning home. Help the girl choose such i, j, x that maximize the calculated value. The first line contains an integer t ( 1 <= t <= 10^4 ) -- number of testcases. Each testcase is described by two lines. The first line contains integers n, k ( 2 <= n <= 2 cdot 10^5 , 1 <= k <= 30 ) -- the length of the sequence of martian numbers and the value of k . The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i < 2^k ) -- a sequence of martian numbers. It is guaranteed that the sum of n over all testcases does not exceed 2 cdot 10^5 . For each testcase, print three integers i, j, x ( 1 <= i, j <= n , i neq j , 0 <= x < 2^k ). The value of (a_i oplus x) & (a_j oplus x) should be the maximum possible. If there are several solutions, you can print any one. First testcase: (3 oplus 14) & (1 oplus 14) = (0011_2 oplus 1110_2) & (0001_2 oplus 1110_2) = 1101_2 = 1101"...

Tutorials

118667

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
215671738 wwwyq07 F July 26, 2023, 4:09 a.m. OK GNU C++14 TESTS 21 62 1638400
215624069 Neodoomer F July 25, 2023, 5:06 p.m. OK GNU C++14 TESTS 21 77 2355200
215677337 AIshuo F July 26, 2023, 5:23 a.m. OK GNU C++14 TESTS 21 77 3174400
215677551 harvey_wzy F July 26, 2023, 5:25 a.m. OK GNU C++14 TESTS 21 78 1638400
215662094 Wzh134009181 F July 26, 2023, 2:12 a.m. OK GNU C++14 TESTS 21 78 1638400
215659293 zxr123 F July 26, 2023, 1:32 a.m. OK GNU C++14 TESTS 21 78 1638400
215658895 3.14159265359 F July 26, 2023, 1:26 a.m. OK GNU C++14 TESTS 21 78 1638400
215658886 astilate F July 26, 2023, 1:25 a.m. OK GNU C++14 TESTS 21 78 1638400
215658837 xiaowu5933 F July 26, 2023, 1:25 a.m. OK GNU C++14 TESTS 21 78 1638400
215654429 garysun2 F July 25, 2023, 11:45 p.m. OK GNU C++14 TESTS 21 78 3174400
215651140 Harshu04 F July 25, 2023, 10:14 p.m. OK GNU C++17 TESTS 21 62 1638400
215622858 Muelsyse_ F July 25, 2023, 5:01 p.m. OK GNU C++17 TESTS 21 62 1638400
215676268 swift51385 F July 26, 2023, 5:10 a.m. OK GNU C++17 TESTS 21 77 1638400
215665738 hnust_lizhongyu F July 26, 2023, 2:56 a.m. OK GNU C++17 TESTS 21 77 1638400
215644032 AhmedRamadan F July 25, 2023, 8:16 p.m. OK GNU C++17 TESTS 21 77 1638400
215627517 MrPerson F July 25, 2023, 5:25 p.m. OK GNU C++17 TESTS 21 77 1638400
215627220 ritvikgupta199 F July 25, 2023, 5:23 p.m. OK GNU C++17 TESTS 21 77 3174400
215674861 DarkTemplarDrop F July 26, 2023, 4:53 a.m. OK GNU C++17 TESTS 21 77 3993600
215633465 BigBadWolf F July 25, 2023, 6:11 p.m. OK GNU C++17 TESTS 21 77 3993600
215625548 star_sea F July 25, 2023, 5:13 p.m. OK GNU C++17 TESTS 21 78 1536000
215674379 ibrm F July 26, 2023, 4:47 a.m. OK GNU C++17 (64) TESTS 21 46 1638400
215671570 fairy_land F July 26, 2023, 4:06 a.m. OK GNU C++17 (64) TESTS 21 46 1638400
215657108 FoceIess F July 26, 2023, 12:56 a.m. OK GNU C++17 (64) TESTS 21 46 3174400
215667154 yurenwuyu F July 26, 2023, 3:12 a.m. OK GNU C++17 (64) TESTS 21 61 1638400
215673368 ibrm F July 26, 2023, 4:32 a.m. OK GNU C++17 (64) TESTS 21 62 1638400
215658668 SugarT F July 26, 2023, 1:23 a.m. OK GNU C++17 (64) TESTS 21 62 1638400
215658543 Tang132520 F July 26, 2023, 1:21 a.m. OK GNU C++17 (64) TESTS 21 62 1638400
215674151 shree_simha F July 26, 2023, 4:43 a.m. OK GNU C++17 (64) TESTS 21 62 2457600
215643214 Glw_pls F July 25, 2023, 8:06 p.m. OK GNU C++17 (64) TESTS 21 62 3174400
215638339 Giga_Cronos F July 25, 2023, 7 p.m. OK GNU C++17 (64) TESTS 21 62 3174400
215679178 ssor96 F July 26, 2023, 5:45 a.m. OK GNU C++20 (64) TESTS 21 46 1638400
215677171 ILECY F July 26, 2023, 5:20 a.m. OK GNU C++20 (64) TESTS 21 46 1638400
215675316 picramide F July 26, 2023, 4:58 a.m. OK GNU C++20 (64) TESTS 21 46 1638400
215673906 nazmuShakib F July 26, 2023, 4:40 a.m. OK GNU C++20 (64) TESTS 21 46 1638400
215673790 Belal_Abouraya F July 26, 2023, 4:38 a.m. OK GNU C++20 (64) TESTS 21 46 1638400
215668828 lddc F July 26, 2023, 3:32 a.m. OK GNU C++20 (64) TESTS 21 46 1638400
215665644 Spring.A F July 26, 2023, 2:55 a.m. OK GNU C++20 (64) TESTS 21 46 1638400
215665210 Spring.A F July 26, 2023, 2:50 a.m. OK GNU C++20 (64) TESTS 21 46 1638400
215664699 Spring.A F July 26, 2023, 2:44 a.m. OK GNU C++20 (64) TESTS 21 46 1638400
215663840 rgnerdplayer F July 26, 2023, 2:34 a.m. OK GNU C++20 (64) TESTS 21 46 1638400
215664600 0x3F F July 26, 2023, 2:43 a.m. OK Go TESTS 21 218 42188800
215634078 usuyus F July 25, 2023, 6:16 p.m. OK Haskell TESTS 21 1980 236339200
215638525 butteronpoptart F July 25, 2023, 7:02 p.m. OK Java 11 TESTS 21 358 819200
215680509 Yousef_Badr F July 26, 2023, 5:59 a.m. OK Java 11 TESTS 21 373 9523200
215625054 uttaran_das F July 25, 2023, 5:11 p.m. OK Java 11 TESTS 21 468 20480000
215625514 dzhi F July 25, 2023, 5:13 p.m. OK Java 11 TESTS 21 577 21401600
215626183 leoncn F July 25, 2023, 5:17 p.m. OK Java 17 TESTS 21 280 1433600
215645289 mcrash12 F July 25, 2023, 8:33 p.m. OK Java 17 TESTS 21 390 6451200
215648919 faresbadr316 F July 25, 2023, 9:26 p.m. OK Java 17 TESTS 21 420 22118400
215648828 faresbadr316 F July 25, 2023, 9:25 p.m. OK Java 17 TESTS 21 421 23244800
215625837 99Attempts F July 25, 2023, 5:15 p.m. OK Java 17 TESTS 21 576 27852800
215623669 frey4 F July 25, 2023, 5:04 p.m. OK Java 17 TESTS 21 607 25190400
215623910 tbs-jyy F July 25, 2023, 5:05 p.m. OK Java 17 TESTS 21 1357 74956800
215622066 Ani_S F July 25, 2023, 4:58 p.m. OK Java 17 TESTS 21 1543 83046400
215650527 woodyiiiiiii F July 25, 2023, 9:59 p.m. OK Java 17 TESTS 21 2136 173568000
215667156 HMETAO F July 26, 2023, 3:12 a.m. OK Java 17 TESTS 21 2293 150220800
215675030 bleach__ F July 26, 2023, 4:54 a.m. OK Java 8 TESTS 21 264 5939200
215664878 jhy0117 F July 26, 2023, 2:46 a.m. OK Java 8 TESTS 21 514 0
215649412 _Kushagra__ F July 25, 2023, 9:35 p.m. OK Java 8 TESTS 21 2901 130764800
215648970 _Kushagra__ F July 25, 2023, 9:27 p.m. OK Java 8 TESTS 21 2963 130764800
215625790 Exusiai1 F July 25, 2023, 5:15 p.m. OK MS C++ 2017 TESTS 21 218 3174400
215624482 lidh184 F July 25, 2023, 5:08 p.m. OK MS C++ 2017 TESTS 21 218 10342400
215625915 conqueror_of_womais F July 25, 2023, 5:16 p.m. OK PyPy 3 TESTS 21 2994 248422400
215639552 gardengnome F July 25, 2023, 7:14 p.m. OK PyPy 3-64 TESTS 21 343 30617600
215654027 hvbird F July 25, 2023, 11:33 p.m. OK PyPy 3-64 TESTS 21 374 48025600
215654703 liupengsay F July 25, 2023, 11:54 p.m. OK PyPy 3-64 TESTS 21 405 27750400
215639060 SoleProprietor F July 25, 2023, 7:09 p.m. OK PyPy 3-64 TESTS 21 436 31436800
215632168 USYDLDH F July 25, 2023, 6 p.m. OK PyPy 3-64 TESTS 21 452 33280000
215651555 RobinFromTheHood F July 25, 2023, 10:23 p.m. OK PyPy 3-64 TESTS 21 467 34201600
215651736 KanishkGoel F July 25, 2023, 10:28 p.m. OK PyPy 3-64 TESTS 21 467 37478400
215623282 Tinky1224 F July 25, 2023, 5:02 p.m. OK PyPy 3-64 TESTS 21 467 38502400
215633957 hvbird F July 25, 2023, 6:15 p.m. OK PyPy 3-64 TESTS 21 514 53964800
215622298 Little_Sheep_Yawn F July 25, 2023, 4:58 p.m. OK PyPy 3-64 TESTS 21 530 37478400
215634789 devasaikishore F July 25, 2023, 6:22 p.m. OK Python 3 TESTS 21 701 35020800
215659090 Sarievo F July 26, 2023, 1:29 a.m. OK Rust 2021 TESTS 21 265 20582400
215667797 bqn F July 26, 2023, 3:19 a.m. OK Rust 2021 TESTS 21 1543 506675200

remove filters

Back to search problems