Codeforces Round 1058 (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
2160 Codeforces Round 1058 (Div. 2) FINISHED False 9000 16125923 Oct. 12, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 15014 ) C Reverse XOR PROGRAMMING bitmasks

Given a positive integer (x), let (f(x)) be the positive integer formed by reversing the binary representation of (x) without leading zeroes. For example, if (x=12=1100_2), then (f(x)=0011_2=3). You are given an integer (n). Please determine if there exists a positive integer (x) such that (x \oplus f(x) = n)(^{\text{∗}}). (^{\text{∗}})Here, (\oplus) denotes the bitwise XOR 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 line of each test case contains an integer (n) ((0 \leq n <2^{30})). For each test case, output YES if there exists a positive integer (x) such that (x \oplus f(x) = n), and NO otherwise. You can output the answer in any case. For example, the strings " yEs ", " yes ", and " Yes " are also recognized as positive responses. In the first case, when (x=1), (f(x)=1), and (x \oplus f(x)=0). Thus, the answer is YES . In the second case, when (x=2), (f(x)=1), and (x \oplus f(x)=3). Thus, the answer is YES . In the fourth test case, we can show there is no (x) that satisfies (x \oplus f(x)=8), so the answer is NO .

Tutorials

Codeforces Round 1058 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
343437198 professor_k C Oct. 12, 2025, 10:28 p.m. OK C# 13 TESTS 6 92 307200
343427622 ksandr1v C Oct. 12, 2025, 8:09 p.m. OK C# 13 TESTS 6 93 2764800
343450688 WBJ114514 C Oct. 13, 2025, 2:45 a.m. OK C++17 (GCC 7-32) TESTS 6 31 0
343635798 notHuman9504 C Oct. 14, 2025, 4:05 a.m. OK C++17 (GCC 7-32) TESTS 6 46 0
343634122 kunming C Oct. 14, 2025, 3:49 a.m. OK C++17 (GCC 7-32) TESTS 6 46 0
343634031 kunming C Oct. 14, 2025, 3:48 a.m. OK C++17 (GCC 7-32) TESTS 6 46 0
343631626 wjttt C Oct. 14, 2025, 3:22 a.m. OK C++17 (GCC 7-32) TESTS 6 46 0
343620508 _ye_1 C Oct. 14, 2025, 12:37 a.m. OK C++17 (GCC 7-32) TESTS 6 46 0
343618590 francois_alex C Oct. 13, 2025, 11:36 p.m. OK C++17 (GCC 7-32) TESTS 6 46 0
343617759 Prababamaba C Oct. 13, 2025, 11:09 p.m. OK C++17 (GCC 7-32) TESTS 6 46 0
343616890 024dsun C Oct. 13, 2025, 10:44 p.m. OK C++17 (GCC 7-32) TESTS 6 46 0
343605779 harsh_r C Oct. 13, 2025, 7:56 p.m. OK C++17 (GCC 7-32) TESTS 6 46 0
343493352 gradola C Oct. 13, 2025, 8:41 a.m. OK C++20 (GCC 13-64) TESTS 6 31 0
343647247 rupesh_b C Oct. 14, 2025, 6:12 a.m. OK C++20 (GCC 13-64) TESTS 6 46 0
343643339 Athrv2 C Oct. 14, 2025, 5:34 a.m. OK C++20 (GCC 13-64) TESTS 6 46 0
343636964 Samarth_Udagi C Oct. 14, 2025, 4:20 a.m. OK C++20 (GCC 13-64) TESTS 6 46 0
343635637 Soria. C Oct. 14, 2025, 4:03 a.m. OK C++20 (GCC 13-64) TESTS 6 46 0
343634296 MiHiR_Kr. C Oct. 14, 2025, 3:51 a.m. OK C++20 (GCC 13-64) TESTS 6 46 0
343626117 Xmanhj C Oct. 14, 2025, 2:18 a.m. OK C++20 (GCC 13-64) TESTS 6 46 0
343622535 wyy0801 C Oct. 14, 2025, 1:19 a.m. OK C++20 (GCC 13-64) TESTS 6 46 0
343619228 IanPardo C Oct. 13, 2025, 11:59 p.m. OK C++20 (GCC 13-64) TESTS 6 46 0
343614335 StarSilk C Oct. 13, 2025, 9:44 p.m. OK C++20 (GCC 13-64) TESTS 6 46 0
343465317 Drumil C Oct. 13, 2025, 5:03 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 31 0
343456972 summermoonlight C Oct. 13, 2025, 3:39 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 31 0
343438990 hungchi17 C Oct. 12, 2025, 11:13 p.m. OK C++23 (GCC 14-64, msys2) TESTS 6 31 0
343646796 saicharank147 C Oct. 14, 2025, 6:07 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 46 0
343644335 ManTis7 C Oct. 14, 2025, 5:44 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 46 0
343643475 darshanmujaldepc C Oct. 14, 2025, 5:35 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 46 0
343639931 Leonardo_Toral C Oct. 14, 2025, 4:57 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 46 0
343636904 legogreens C Oct. 14, 2025, 4:20 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 46 0
343636385 mr.itmo C Oct. 14, 2025, 4:13 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 46 0
343635006 ujjwaldeep_77 C Oct. 14, 2025, 3:57 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 46 0
343631697 asymptote314 C Oct. 14, 2025, 3:23 a.m. OK GNU C11 TESTS 6 77 102400
343581709 davideperegoo C Oct. 13, 2025, 5:10 p.m. OK GNU C11 TESTS 6 77 102400
343475428 SOHAN2358 C Oct. 13, 2025, 6:32 a.m. OK GNU C11 TESTS 6 93 0
343454732 mirai_39 C Oct. 13, 2025, 3:18 a.m. OK GNU C11 TESTS 6 93 0
343452251 ghyperboy8 C Oct. 13, 2025, 2:58 a.m. OK GNU C11 TESTS 6 93 0
343435378 malikquasran C Oct. 12, 2025, 9:50 p.m. OK Haskell TESTS 6 93 0
343500914 BurnerAce C Oct. 13, 2025, 9:32 a.m. OK Java 21 TESTS 6 234 307200
343508862 Saucyy C Oct. 13, 2025, 10:34 a.m. OK Java 21 TESTS 6 249 2150400
343502031 Aryan_Yadav123 C Oct. 13, 2025, 9:40 a.m. OK Java 21 TESTS 6 264 409600
343428215 VaHiX C Oct. 12, 2025, 8:15 p.m. OK Java 21 TESTS 6 265 614400
343462357 tekka_ity C Oct. 13, 2025, 4:29 a.m. OK Java 21 TESTS 6 265 819200
343635889 kartik__sethi C Oct. 14, 2025, 4:06 a.m. OK Java 21 TESTS 6 265 2048000
343629961 Sagar_TH_29 C Oct. 14, 2025, 3:05 a.m. OK Java 21 TESTS 6 280 204800
343478182 ...uni C Oct. 13, 2025, 6:51 a.m. OK Java 21 TESTS 6 280 512000
343472961 shhh_knight30 C Oct. 13, 2025, 6:13 a.m. OK Java 21 TESTS 6 280 716800
343602653 priyank_4_sure C Oct. 13, 2025, 7:28 p.m. OK Java 21 TESTS 6 281 614400
343604921 eayero C Oct. 13, 2025, 7:49 p.m. OK Java 8 TESTS 6 139 0
343468140 lupunish C Oct. 13, 2025, 5:31 a.m. OK Java 8 TESTS 6 140 0
343566628 kasiru_69 C Oct. 13, 2025, 3:41 p.m. OK Java 8 TESTS 6 202 0
343478967 asbro3886 C Oct. 13, 2025, 6:57 a.m. OK Java 8 TESTS 6 218 0
343531951 K_Keerthana C Oct. 13, 2025, 12:58 p.m. OK Java 8 TESTS 6 233 0
343554026 Piccolo_san C Oct. 13, 2025, 2:35 p.m. OK Java 8 TESTS 6 249 0
343510965 akshita_0802 C Oct. 13, 2025, 10:51 a.m. OK Java 8 TESTS 6 249 0
343478912 asbro3886 C Oct. 13, 2025, 6:57 a.m. OK Java 8 TESTS 6 264 0
343496511 yallavamsipavan C Oct. 13, 2025, 9:02 a.m. OK Java 8 TESTS 6 265 0
343483590 jagbarrameda C Oct. 13, 2025, 7:31 a.m. OK Kotlin 1.9 TESTS 6 156 0
343428334 VaHiX C Oct. 12, 2025, 8:17 p.m. OK Kotlin 2.2 TESTS 6 218 0
343576455 opgod_07 C Oct. 13, 2025, 4:39 p.m. OK PyPy 3 TESTS 6 171 5632000
343499415 ami_XR C Oct. 13, 2025, 9:21 a.m. OK PyPy 3 TESTS 6 186 8908800
343429720 amn9130 C Oct. 12, 2025, 8:31 p.m. OK PyPy 3 TESTS 6 592 10035200
343444575 fatalerror C Oct. 13, 2025, 1:36 a.m. OK PyPy 3-64 TESTS 6 93 3276800
343433080 stephenwhawking343 C Oct. 12, 2025, 9:13 p.m. OK PyPy 3-64 TESTS 6 93 3379200
343425095 Ne0B1ade C Oct. 12, 2025, 7:46 p.m. OK PyPy 3-64 TESTS 6 109 3379200
343597538 aa_despa C Oct. 13, 2025, 6:48 p.m. OK PyPy 3-64 TESTS 6 109 5120000
343457844 _syntrax_wolf C Oct. 13, 2025, 3:46 a.m. OK PyPy 3-64 TESTS 6 124 3481600
343443660 whraaqq C Oct. 13, 2025, 1:19 a.m. OK PyPy 3-64 TESTS 6 124 4505600
343497516 shiqi1 C Oct. 13, 2025, 9:09 a.m. OK PyPy 3-64 TESTS 6 125 3174400
343426272 iedfa C Oct. 12, 2025, 7:56 p.m. OK PyPy 3-64 TESTS 6 125 4198400
343508553 minuki646 C Oct. 13, 2025, 10:32 a.m. OK PyPy 3-64 TESTS 6 139 3891200
343524952 Razvan7220 C Oct. 13, 2025, 12:21 p.m. OK PyPy 3-64 TESTS 6 139 4198400
343428121 VaHiX C Oct. 12, 2025, 8:14 p.m. OK Python 3 TESTS 6 62 1433600
343447972 eugalt C Oct. 13, 2025, 2:23 a.m. OK Python 3 TESTS 6 77 1228800
343529186 major4ik_0 C Oct. 13, 2025, 12:44 p.m. OK Python 3 TESTS 6 93 307200
343447100 eugalt C Oct. 13, 2025, 2:14 a.m. OK Python 3 TESTS 6 93 1228800
343546881 hansika_koneti C Oct. 13, 2025, 1:59 p.m. OK Python 3 TESTS 6 109 102400
343450008 Argonised C Oct. 13, 2025, 2:40 a.m. OK Python 3 TESTS 6 109 102400
343467106 Roentgenium.111 C Oct. 13, 2025, 5:21 a.m. OK Python 3 TESTS 6 109 1331200
343463448 need_thing C Oct. 13, 2025, 4:42 a.m. OK Python 3 TESTS 6 124 102400
343439675 ombpatre C Oct. 12, 2025, 11:32 p.m. OK Python 3 TESTS 6 124 102400
343464586 kira70218 C Oct. 13, 2025, 4:55 a.m. OK Python 3 TESTS 6 140 102400
343438107 bor2com C Oct. 12, 2025, 10:50 p.m. OK Rust 2021 TESTS 6 77 0
343432453 anass.b C Oct. 12, 2025, 9:04 p.m. OK Rust 2024 TESTS 6 77 0
343579202 JustAndreyka C Oct. 13, 2025, 4:55 p.m. OK Rust 2024 TESTS 6 93 0

remove filters

Back to search problems