Codeforces Round 1057 (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
2153 Codeforces Round 1057 (Div. 2) FINISHED False 8100 16298723 Oct. 10, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 22499 ) B Bitwise Reversion PROGRAMMING bitmasks

You are given three non-negative integers (x), (y) and (z). Determine whether there exist three non-negative integers (a), (b) and (c) satisfying the following three conditions: (a \mathbin{\&} b = x) (b \mathbin{\&} c = y) (a \mathbin{\&} c = z) where (\mathbin{\&}) denotes the bitwise AND operation . Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first and only line of each test case contains three integers (x), (y) and (z) ((0\le x, y, z\le 10^9)) — the target values of (a \mathbin{\&} b), (b \mathbin{\&} c) and (a \mathbin{\&} c), respectively. For each test case, output " YES " if there exists three non-negative integers (a), (b), and (c) satisfying the above conditions, and " NO " otherwise. You can output the answer in any case (upper or lower). For example, the strings " yEs ", " yes ", " Yes ", and " YES " will be recognized as positive responses. In the first test case, (a = 3), (b = 5), and (c = 9) satisfies the condition as (3 \mathbin{\&} 5 = 1), (5 \mathbin{\&} 9 = 1), and (3 \mathbin{\&} 9 = 1). In the second test case, (a = 7), (b = 3), and (c = 22) satisfies the condition as (7 \mathbin{\&} 3 = 3), (3 \mathbin{\&} 22 = 2), and (7 \mathbin{\&} 22 = 6). In the third test case, it can be proven that there are no three non-negative integers (a), (b), and (c) such that (a \mathbin{\&} b = 4), (b \mathbin{\&} c = 8), and (a \mathbin{\&} c = 12).

Tutorials

Codeforces Round 1057 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
343010821 Maharram B Oct. 10, 2025, 4:39 p.m. OK C# 13 TESTS 10 124 3072000
343045848 ksandr1v B Oct. 10, 2025, 9:49 p.m. OK C# 13 TESTS 10 155 2764800
343074613 duykha121314888 B Oct. 11, 2025, 6:04 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
343073821 BaCl2_ B Oct. 11, 2025, 5:58 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
343073601 Markjk B Oct. 11, 2025, 5:56 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
343072136 linlic B Oct. 11, 2025, 5:44 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
343066491 Megatronus69 B Oct. 11, 2025, 4:48 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
343065777 msvardhan19 B Oct. 11, 2025, 4:40 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
343065228 tnakao B Oct. 11, 2025, 4:33 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
343063461 _manish_78 B Oct. 11, 2025, 4:10 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
343054591 Rinker B Oct. 11, 2025, 1:43 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
343054169 sai_kiran06 B Oct. 11, 2025, 1:33 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
343074352 Shashass B Oct. 11, 2025, 6:02 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
343074137 pugaz2006 B Oct. 11, 2025, 6:01 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
343073765 guizhennan B Oct. 11, 2025, 5:58 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
343073044 pro_code_ B Oct. 11, 2025, 5:51 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
343073036 krishpatel B Oct. 11, 2025, 5:51 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
343072402 Jaylen B Oct. 11, 2025, 5:46 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
343071749 Jaylen B Oct. 11, 2025, 5:40 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
343070536 sunil_patel B Oct. 11, 2025, 5:29 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
343070147 shelby70 B Oct. 11, 2025, 5:25 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
343070050 Siyam_Talukder B Oct. 11, 2025, 5:24 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
343074497 Guitar_Jasmine B Oct. 11, 2025, 6:03 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
343074102 chhhcooh B Oct. 11, 2025, 6 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
343073179 criticalcoding B Oct. 11, 2025, 5:53 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
343072606 Zhi_Sheng B Oct. 11, 2025, 5:48 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
343072566 blinderchief B Oct. 11, 2025, 5:47 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
343072473 is-ra B Oct. 11, 2025, 5:46 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
343072442 amitsabnis2004 B Oct. 11, 2025, 5:46 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
343072190 retah B Oct. 11, 2025, 5:44 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
343071774 RobiulHasanJisan B Oct. 11, 2025, 5:41 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
343071205 MannuOP B Oct. 11, 2025, 5:35 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
343013410 ankitagarwal546 B Oct. 10, 2025, 4:45 p.m. OK GNU C11 TESTS 10 92 0
343060347 sohancse33_112 B Oct. 11, 2025, 3:24 a.m. OK GNU C11 TESTS 10 93 102400
343007806 keerat_05 B Oct. 10, 2025, 4:31 p.m. OK GNU C11 TESTS 10 93 102400
343024894 ddminh2607 B Oct. 10, 2025, 6:19 p.m. OK GNU C11 TESTS 10 93 204800
343037811 mksabbirrahman B Oct. 10, 2025, 8:01 p.m. OK GNU C11 TESTS 10 108 102400
343015279 Fire_3636 B Oct. 10, 2025, 4:49 p.m. OK GNU C11 TESTS 10 109 0
343014163 MahamudulFerdous B Oct. 10, 2025, 4:47 p.m. OK GNU C11 TESTS 10 109 0
343007673 AsifaAfroz11 B Oct. 10, 2025, 4:31 p.m. OK GNU C11 TESTS 10 109 0
343026112 sans1441 B Oct. 10, 2025, 6:26 p.m. OK GNU C11 TESTS 10 109 102400
343010874 alif405 B Oct. 10, 2025, 4:40 p.m. OK GNU C11 TESTS 10 109 102400
343067055 deepu4477 B Oct. 11, 2025, 4:54 a.m. OK Java 21 TESTS 10 218 716800
343071079 CoHHa9_MyXa B Oct. 11, 2025, 5:34 a.m. OK Java 21 TESTS 10 218 1228800
343008192 kshitijkolekar555 B Oct. 10, 2025, 4:33 p.m. OK Java 21 TESTS 10 233 2048000
343062040 minibin B Oct. 11, 2025, 3:49 a.m. OK Java 21 TESTS 10 249 921600
343035229 priyank_4_sure B Oct. 10, 2025, 7:35 p.m. OK Java 21 TESTS 10 264 1228800
343048573 shihmaz B Oct. 10, 2025, 10:50 p.m. OK Java 21 TESTS 10 265 409600
343073921 amayank18 B Oct. 11, 2025, 5:59 a.m. OK Java 21 TESTS 10 280 409600
343041491 Yash_datoniya B Oct. 10, 2025, 8:43 p.m. OK Java 21 TESTS 10 280 614400
343051469 harshitkumar20 B Oct. 11, 2025, 12:21 a.m. OK Java 21 TESTS 10 281 307200
343069162 AKhacks B Oct. 11, 2025, 5:14 a.m. OK Java 21 TESTS 10 281 921600
343034976 suntansoker B Oct. 10, 2025, 7:33 p.m. OK Java 8 TESTS 10 156 0
343066547 NithishReddyK B Oct. 11, 2025, 4:49 a.m. OK Java 8 TESTS 10 187 0
343061614 talhaanjum B Oct. 11, 2025, 3:43 a.m. OK Java 8 TESTS 10 249 0
343025886 vootkuriakshayreddy B Oct. 10, 2025, 6:25 p.m. OK Java 8 TESTS 10 264 0
343013730 ingenuitybtx B Oct. 10, 2025, 4:46 p.m. OK Java 8 TESTS 10 265 0
343009374 agbuddy B Oct. 10, 2025, 4:36 p.m. OK Java 8 TESTS 10 280 0
343023714 abhaysolanki1712 B Oct. 10, 2025, 6:13 p.m. OK Java 8 TESTS 10 281 0
343011360 chandu33 B Oct. 10, 2025, 4:41 p.m. OK Java 8 TESTS 10 296 0
343008608 karmukilanv33 B Oct. 10, 2025, 4:34 p.m. OK Java 8 TESTS 10 327 0
343011323 stavyah B Oct. 10, 2025, 4:41 p.m. OK PyPy 3 TESTS 10 265 6553600
343071893 Vedant_Vispute B Oct. 11, 2025, 5:42 a.m. OK PyPy 3 TESTS 10 296 7884800
343013107 DoryperPevin B Oct. 10, 2025, 4:45 p.m. OK PyPy 3 TESTS 10 562 9625600
343055695 hungchi17 B Oct. 11, 2025, 2:07 a.m. OK PyPy 3-64 TESTS 10 109 2662400
343065734 tocatta B Oct. 11, 2025, 4:40 a.m. OK PyPy 3-64 TESTS 10 109 2764800
343044196 gardengnome B Oct. 10, 2025, 9:20 p.m. OK PyPy 3-64 TESTS 10 109 2764800
343010957 Mahesh1816 B Oct. 10, 2025, 4:40 p.m. OK PyPy 3-64 TESTS 10 109 3993600
343047118 sixthcore B Oct. 10, 2025, 10:15 p.m. OK PyPy 3-64 TESTS 10 109 16384000
343033899 jvatsal0709 B Oct. 10, 2025, 7:24 p.m. OK PyPy 3-64 TESTS 10 124 3481600
343062136 dhrxv._ B Oct. 11, 2025, 3:51 a.m. OK PyPy 3-64 TESTS 10 124 3891200
343067914 Rudra_Dudhat B Oct. 11, 2025, 5:02 a.m. OK PyPy 3-64 TESTS 10 124 4198400
343038341 jsaddict044 B Oct. 10, 2025, 8:07 p.m. OK PyPy 3-64 TESTS 10 124 4812800
343041113 anshgoel2580 B Oct. 10, 2025, 8:38 p.m. OK PyPy 3-64 TESTS 10 124 5017600
343065780 tocatta B Oct. 11, 2025, 4:40 a.m. OK Python 3 TESTS 10 92 204800
343059775 tocatta B Oct. 11, 2025, 3:15 a.m. OK Python 3 TESTS 10 93 102400
343029151 eugalt B Oct. 10, 2025, 6:46 p.m. OK Python 3 TESTS 10 93 1228800
343065856 tocatta B Oct. 11, 2025, 4:41 a.m. OK Python 3 TESTS 10 108 102400
343052009 jkey725 B Oct. 11, 2025, 12:37 a.m. OK Python 3 TESTS 10 109 0
343061405 prakku_2634 B Oct. 11, 2025, 3:40 a.m. OK Python 3 TESTS 10 109 204800
343066228 Ramine001 B Oct. 11, 2025, 4:45 a.m. OK Python 3 TESTS 10 124 0
343027262 Sonysilva B Oct. 10, 2025, 6:33 p.m. OK Python 3 TESTS 10 124 0
343024066 bravojay B Oct. 10, 2025, 6:15 p.m. OK Python 3 TESTS 10 124 0
343015658 MUDITAGRAWAL B Oct. 10, 2025, 4:49 p.m. OK Python 3 TESTS 10 124 102400
343067516 silicalet B Oct. 11, 2025, 4:58 a.m. OK Rust 2024 TESTS 10 61 0

remove filters

Back to search problems