Nebius Round 2 (Codeforces Round 1088, Div. 1 + 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
2211 Nebius Round 2 (Codeforces Round 1088, Div. 1 + Div. 2) FINISHED False 9000 1696523 March 28, 2026, 2:45 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 2734 ) D AND-array PROGRAMMING bitmasks combinatorics math

For a sequence (a) of length (n), we define its AND-array (f(a)) as follows: ()f(a)_k = \sum\limits_{1 \le i_1 \lt i_2 \lt \ldots \lt i_k \le n} a_{i_1} \& a_{i_2} \& \ldots \& a_{i_k}() for all (1\le k\le n), where (\&) denotes the bitwise AND operation . In other words, (f(a)_k) is a sum of bitwise AND over all subsequences(^{\text{∗}}) of (a) with length (k). The sequence (a) is unknown to you. However, you are provided with a sequence (b) of length (n) such that (b_i \equiv f(a)_i \pmod{10^9 + 7}) for all (1 \le i \le n). Your task is to reconstruct the sequence (a) based on the given sequence (b). (^{\text{∗}})A sequence (c) is a subsequence of a sequence (d) if (c) can be obtained from (d) by the deletion of several (possibly, zero or all) element from arbitrary positions. Two subsequences are considered different if the sets of positions of the deleted elements are different. 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 a single integer (n) ((1 \le n \le 10^5)) — the length of sequences (a) and (b). The second line of each test case contains (n) integers (b_1, b_2, \ldots, b_n) ((0 \le b_i \lt 10^9 + 7)) — the sequence (b). It is guaranteed that there exists a sequence (a) of length (n) with (0 \le a_i \lt 2^{29}), such that (b_i \equiv f(a)_i \pmod{10^9 + 7}) for all (1 \le i \le n). It is guaranteed that the sum of (n) over all test cases does not exceed (10^5). Output (n) integers (a_1, a_2, \ldots, a_n) ((0\le a_i \lt 2^{29})) representing the reconstructed sequence (a). If there are multiple possible sequences satisfying the constraints, output any. In the second example, for (a = 5, 3, 6, 1, 7) the value of $$$f(

Tutorials

Nebius Round 2 and Codeforces Round 1088 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
368585800 kidla D March 28, 2026, 4:45 p.m. OK C# 10 TESTS 15 187 15360000
368587296 SaideGert D March 28, 2026, 4:50 p.m. OK C++17 (GCC 7-32) TESTS 15 109 1638400
368585429 MrLaz D March 28, 2026, 4:44 p.m. OK C++17 (GCC 7-32) TESTS 15 109 1638400
368623371 bubbarob19 D March 29, 2026, 3:14 a.m. OK C++17 (GCC 7-32) TESTS 15 125 102400
368584610 Mohammed_Abrar D March 28, 2026, 4:42 p.m. OK C++17 (GCC 7-32) TESTS 15 125 102400
368581216 Dixit_md D March 28, 2026, 4:32 p.m. OK C++17 (GCC 7-32) TESTS 15 125 102400
368601715 maverick15 D March 28, 2026, 6:49 p.m. OK C++17 (GCC 7-32) TESTS 15 125 1638400
368591390 olivvan D March 28, 2026, 5:03 p.m. OK C++17 (GCC 7-32) TESTS 15 125 1638400
368589442 sw2022 D March 28, 2026, 4:56 p.m. OK C++17 (GCC 7-32) TESTS 15 125 1638400
368586508 cfcf1111 D March 28, 2026, 4:47 p.m. OK C++17 (GCC 7-32) TESTS 15 125 1638400
368584716 wd002 D March 28, 2026, 4:42 p.m. OK C++17 (GCC 7-32) TESTS 15 125 1638400
368633748 xina D March 29, 2026, 5:53 a.m. OK C++20 (GCC 13-64) TESTS 15 62 1638400
368620229 bladewaltz D March 29, 2026, 1:57 a.m. OK C++20 (GCC 13-64) TESTS 15 62 1638400
368606155 DUDUU_tem D March 28, 2026, 7:42 p.m. OK C++20 (GCC 13-64) TESTS 15 62 1638400
368601757 Kobe_Bryant_Laoda D March 28, 2026, 6:50 p.m. OK C++20 (GCC 13-64) TESTS 15 62 1638400
368592321 jaiswaz07 D March 28, 2026, 5:06 p.m. OK C++20 (GCC 13-64) TESTS 15 62 1638400
368592244 Mahakall D March 28, 2026, 5:06 p.m. OK C++20 (GCC 13-64) TESTS 15 62 1638400
368586185 zoryn D March 28, 2026, 4:46 p.m. OK C++20 (GCC 13-64) TESTS 15 62 1638400
368609682 concl D March 28, 2026, 8:39 p.m. OK C++20 (GCC 13-64) TESTS 15 62 3276800
368594442 I_will_AKNOI D March 28, 2026, 5:12 p.m. OK C++20 (GCC 13-64) TESTS 15 62 3276800
368622185 zyz_yuanzhe D March 29, 2026, 2:47 a.m. OK C++20 (GCC 13-64) TESTS 15 62 32153600
368601390 3rian_jr D March 28, 2026, 6:46 p.m. OK C++23 (GCC 14-64, msys2) TESTS 15 46 1638400
368626741 Leopold_Fitz D March 29, 2026, 4:21 a.m. OK C++23 (GCC 14-64, msys2) TESTS 15 62 102400
368592346 SDUWH_public D March 28, 2026, 5:06 p.m. OK C++23 (GCC 14-64, msys2) TESTS 15 62 102400
368584948 Anemone_ D March 28, 2026, 4:42 p.m. OK C++23 (GCC 14-64, msys2) TESTS 15 62 102400
368593208 OshoWosho D March 28, 2026, 5:09 p.m. OK C++23 (GCC 14-64, msys2) TESTS 15 62 204800
368632505 RubayetRafsan D March 29, 2026, 5:40 a.m. OK C++23 (GCC 14-64, msys2) TESTS 15 62 1638400
368626461 Dcukducker D March 29, 2026, 4:15 a.m. OK C++23 (GCC 14-64, msys2) TESTS 15 62 1638400
368603784 dimastrakhal D March 28, 2026, 7:12 p.m. OK C++23 (GCC 14-64, msys2) TESTS 15 62 1638400
368595368 n4418779 D March 28, 2026, 5:14 p.m. OK C++23 (GCC 14-64, msys2) TESTS 15 62 1638400
368594774 frogzz D March 28, 2026, 5:13 p.m. OK C++23 (GCC 14-64, msys2) TESTS 15 62 1638400
368582867 pengin_2000 D March 28, 2026, 4:37 p.m. OK GNU C11 TESTS 15 203 3276800
368595209 Kartheeeeek D March 28, 2026, 5:14 p.m. OK GNU C11 TESTS 15 531 4096000
368590067 aryankaran.dev.18 D March 28, 2026, 4:58 p.m. OK GNU C11 TESTS 15 578 2457600
368589535 dhiraj_pgcat D March 28, 2026, 4:57 p.m. OK GNU C11 TESTS 15 984 3174400
368587888 d1startion D March 28, 2026, 4:52 p.m. OK Go TESTS 15 218 5427200
368617549 aha D March 29, 2026, 12:27 a.m. OK Java 21 TESTS 15 296 1638400
368583958 jdltc D March 28, 2026, 4:40 p.m. OK Java 21 TESTS 15 343 1945600
368588349 AnkanMisra D March 28, 2026, 4:53 p.m. OK Java 21 TESTS 15 390 1331200
368591536 _kazuto_nwb D March 28, 2026, 5:03 p.m. OK Java 21 TESTS 15 390 2048000
368583253 Saravana_Krishnan_J D March 28, 2026, 4:38 p.m. OK Java 21 TESTS 15 406 7884800
368585646 man-ray D March 28, 2026, 4:45 p.m. OK Java 21 TESTS 15 484 2252800
368627455 BiggestFish06 D March 29, 2026, 4:34 a.m. OK Java 21 TESTS 15 609 716800
368616759 kartik__sethi D March 28, 2026, 11:53 p.m. OK Java 21 TESTS 15 625 2150400
368610546 ousben63 D March 28, 2026, 8:56 p.m. OK Java 8 TESTS 15 1109 0
368591783 nullbrain_ D March 28, 2026, 5:04 p.m. OK Kotlin 2.2 TESTS 15 312 23961600
368584385 SebasMusk D March 28, 2026, 4:41 p.m. OK PyPy 3-64 TESTS 15 156 17510400
368601852 last_theorem D March 28, 2026, 6:51 p.m. OK PyPy 3-64 TESTS 15 203 18329600
368601713 CodeBharat D March 28, 2026, 6:49 p.m. OK PyPy 3-64 TESTS 15 218 18022400
368607118 wanna_be_CM D March 28, 2026, 7:56 p.m. OK PyPy 3-64 TESTS 15 234 18022400
368605361 teekaytai D March 28, 2026, 7:31 p.m. OK PyPy 3-64 TESTS 15 234 18227200
368613078 DeadMan69 D March 28, 2026, 9:52 p.m. OK PyPy 3-64 TESTS 15 234 21913600
368615410 weii2000 D March 28, 2026, 11:03 p.m. OK PyPy 3-64 TESTS 15 250 15872000
368589266 amanv2 D March 28, 2026, 4:56 p.m. OK PyPy 3-64 TESTS 15 250 16691200
368592610 detteiuu D March 28, 2026, 5:07 p.m. OK PyPy 3-64 TESTS 15 265 33484800
368593832 kkigon D March 28, 2026, 5:11 p.m. OK PyPy 3-64 TESTS 15 296 14950400
368590318 rajnisihsingh07 D March 28, 2026, 4:59 p.m. OK Python 3 TESTS 15 1375 21401600
368582202 yashjaiswal88542 D March 28, 2026, 4:35 p.m. OK Python 3 TESTS 15 1625 20480000
368586807 kscharan1608 D March 28, 2026, 4:48 p.m. OK Python 3 TESTS 15 1656 31436800
368595308 APTXmas4869 D March 28, 2026, 5:14 p.m. OK Python 3 TESTS 15 2562 22425600
368583254 darkkcyan D March 28, 2026, 4:38 p.m. OK Rust 2024 TESTS 15 62 14438400
368602493 NagisaF D March 28, 2026, 6:57 p.m. OK Rust 2024 TESTS 15 406 11776000
368593556 davidmiheev D March 28, 2026, 5:10 p.m. OK Rust 2024 TESTS 15 1125 22630400
368591416 hardgonnapass D March 28, 2026, 5:03 p.m. OK Scala TESTS 15 671 0

remove filters

Back to search problems