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
( 11142 ) B Mickey Mouse Constructive PROGRAMMING greedy math

Given an array (a), let (f(a)) be the number of ways to partition (a) into one or more subarrays(^{\text{∗}}) such that: Each element appears in exactly one subarray. All subarrays have the same sum. For example, if (a=1,1), then (f(a)=2), because there are two such ways to partition (1,1): (1,1), where the only subarray has sum (2). (1+1), where both subarrays have sum (1). You are given two integers (x) and (y). Find the minimum value of (f(a)) over all arrays (a) of length (x+y), consisting of (x) copies of the number (1), and (y) copies of the number (-1) in some order. Since this answer may be large, output the answer modulo (676\,767\,677). Additionally, you should construct one array that achieves this minimal value. (^{\text{∗}})An array (b) is a subarray of an array (c) if (b) can be obtained from (c) by the deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end. 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 two integers (x) and (y) ((0 \leq x,y \leq 2\cdot 10^5)). It is guaranteed that (x+y \geq 1). It is guaranteed that the sum of (x) over all test cases does not exceed (2\cdot 10^5), and the sum of (y) over all test cases does not exceed (2\cdot 10^5). For each test case, output two lines: the minimum value of (f(a)) over all valid arrays (a) modulo (676\,767\,677), and an example of an array that achieves the minimal result. Note you are minimizing (f(a)), and taking that minimum value modulo (676\,767\,677), not finding the minimal possible result of (f(a)) mod (676\,767\,677). In the first test case, (x=2) and (y=0). The only poss

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
368603431 samirpsalim B March 28, 2026, 7:08 p.m. OK C# 13 TESTS 9 187 19968000
368633673 zjl_lmy B March 29, 2026, 5:53 a.m. OK C++17 (GCC 7-32) TESTS 9 31 102400
368595419 Riyaa47 B March 28, 2026, 5:14 p.m. OK C++17 (GCC 7-32) TESTS 9 31 102400
368594795 pxrsistence B March 28, 2026, 5:13 p.m. OK C++17 (GCC 7-32) TESTS 9 31 102400
368582231 sarkerantor B March 28, 2026, 4:35 p.m. OK C++17 (GCC 7-32) TESTS 9 31 102400
368625956 KiNnT B March 29, 2026, 4:05 a.m. OK C++17 (GCC 7-32) TESTS 9 46 0
368614455 BethGabara B March 28, 2026, 10:31 p.m. OK C++17 (GCC 7-32) TESTS 9 46 0
368603544 GANGSTEROJ B March 28, 2026, 7:09 p.m. OK C++17 (GCC 7-32) TESTS 9 46 0
368588366 vaibhavdeeptmurty B March 28, 2026, 4:53 p.m. OK C++17 (GCC 7-32) TESTS 9 46 0
368588165 astrodive B March 28, 2026, 4:52 p.m. OK C++17 (GCC 7-32) TESTS 9 46 0
368584746 plmt3742 B March 28, 2026, 4:42 p.m. OK C++17 (GCC 7-32) TESTS 9 46 0
368621010 Gemini3.1Pro B March 29, 2026, 2:18 a.m. OK C++20 (GCC 13-64) TESTS 9 31 0
368619918 Gemini3.1Pro B March 29, 2026, 1:48 a.m. OK C++20 (GCC 13-64) TESTS 9 31 0
368624466 theRealShroomBoy B March 29, 2026, 3:36 a.m. OK C++20 (GCC 13-64) TESTS 9 31 102400
368608698 soldier_01 B March 28, 2026, 8:21 p.m. OK C++20 (GCC 13-64) TESTS 9 31 102400
368631675 Whale_Wholesaler B March 29, 2026, 5:31 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
368629087 -Shu- B March 29, 2026, 5 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
368625578 Gemini3.1Pro B March 29, 2026, 3:58 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
368620500 MLttt B March 29, 2026, 2:05 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
368618511 drogbaaaa B March 29, 2026, 1:03 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
368618118 bugchen B March 29, 2026, 12:49 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
368626584 Kakusei B March 29, 2026, 4:18 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 31 0
368608330 Ya-chmen B March 28, 2026, 8:14 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 31 0
368600756 1.b3 B March 28, 2026, 6:42 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 31 0
368631590 ahasan_mugdho B March 29, 2026, 5:30 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 31 102400
368631064 bhcodeforces B March 29, 2026, 5:24 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 31 102400
368622066 VoidalityK B March 29, 2026, 2:44 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 31 102400
368612897 csirac B March 28, 2026, 9:48 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 31 102400
368612556 Mostafa_7eshmat B March 28, 2026, 9:39 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 31 102400
368609237 DrownedDragon06 B March 28, 2026, 8:30 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 31 102400
368607793 baadmescohenge B March 28, 2026, 8:06 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 31 102400
368613243 vvvDrew B March 28, 2026, 9:56 p.m. OK GNU C11 TESTS 9 15 33587200
368589674 gormelqumyan6 B March 28, 2026, 4:57 p.m. OK GNU C11 TESTS 9 46 2457600
368633887 Vancha_Abhinav_Reddy B March 29, 2026, 5:54 a.m. OK GNU C11 TESTS 9 62 0
368603392 Blaze_19 B March 28, 2026, 7:07 p.m. OK GNU C11 TESTS 9 109 0
368603232 Blaze_19 B March 28, 2026, 7:05 p.m. OK GNU C11 TESTS 9 125 0
368617206 actualtsg B March 29, 2026, 12:13 a.m. OK GNU C11 TESTS 9 125 1024000
368589798 ysyh0808 B March 28, 2026, 4:58 p.m. OK GNU C11 TESTS 9 546 0
368619996 Benq B March 29, 2026, 1:50 a.m. OK GNU C11 TESTS 9 1500 1843200
368586248 d1startion B March 28, 2026, 4:46 p.m. OK Go TESTS 9 31 204800
368586277 relaxgameing20212012 B March 28, 2026, 4:47 p.m. OK Go TESTS 9 62 2355200
368625928 sathwikhbhat B March 29, 2026, 4:04 a.m. OK Java 21 TESTS 9 171 1536000
368620208 DJ1007 B March 29, 2026, 1:57 a.m. OK Java 21 TESTS 9 187 102400
368582452 Yonesh_Murugan B March 28, 2026, 4:36 p.m. OK Java 21 TESTS 9 203 1638400
368602746 GoodBoy20 B March 28, 2026, 7 p.m. OK Java 21 TESTS 9 218 409600
368611444 saanikaa B March 28, 2026, 9:14 p.m. OK Java 21 TESTS 9 218 614400
368626314 Devstudent01 B March 29, 2026, 4:13 a.m. OK Java 21 TESTS 9 218 9011200
368584092 sajjadahmeddd B March 28, 2026, 4:40 p.m. OK Java 21 TESTS 9 234 307200
368582988 waitxlight B March 28, 2026, 4:37 p.m. OK Java 21 TESTS 9 234 307200
368589014 pwasu B March 28, 2026, 4:55 p.m. OK Java 21 TESTS 9 234 614400
368590198 Jiwesh86 B March 28, 2026, 4:59 p.m. OK Java 21 TESTS 9 234 1024000
368586053 vivekyadav00681 B March 28, 2026, 4:46 p.m. OK Java 8 TESTS 9 406 0
368587112 mayank_112 B March 28, 2026, 4:49 p.m. OK Java 8 TESTS 9 437 0
368588393 nandhyalakarthik8 B March 28, 2026, 4:53 p.m. OK Java 8 TESTS 9 718 0
368608237 325iitd B March 28, 2026, 8:13 p.m. OK PyPy 3 TESTS 9 265 6041600
368632724 Sarthak_4722 B March 29, 2026, 5:43 a.m. OK PyPy 3 TESTS 9 312 21094400
368604386 Rajrishi_2006 B March 28, 2026, 7:18 p.m. OK PyPy 3 TESTS 9 515 18329600
368627032 Sruteesh B March 29, 2026, 4:26 a.m. OK PyPy 3 TESTS 9 546 10547200
368582588 TwoTarang123 B March 28, 2026, 4:36 p.m. OK PyPy 3-64 TESTS 9 93 15257600
368594722 Pat4onus2003 B March 28, 2026, 5:13 p.m. OK PyPy 3-64 TESTS 9 109 14848000
368588020 Leoric0730 B March 28, 2026, 4:52 p.m. OK PyPy 3-64 TESTS 9 109 14950400
368631071 Blackwolf12 B March 29, 2026, 5:24 a.m. OK PyPy 3-64 TESTS 9 140 8806400
368632491 nayans07 B March 29, 2026, 5:40 a.m. OK PyPy 3-64 TESTS 9 140 15564800
368635356 vivekjd_9 B March 29, 2026, 6:09 a.m. OK PyPy 3-64 TESTS 9 140 22528000
368634572 pranjaysidhwani B March 29, 2026, 6:01 a.m. OK PyPy 3-64 TESTS 9 140 22528000
368616192 masao B March 28, 2026, 11:32 p.m. OK PyPy 3-64 TESTS 9 140 23347200
368616070 soham_masao B March 28, 2026, 11:26 p.m. OK PyPy 3-64 TESTS 9 140 23347200
368590129 DatHam B March 28, 2026, 4:59 p.m. OK PyPy 3-64 TESTS 9 156 5222400
368583171 rashed195 B March 28, 2026, 4:38 p.m. OK Python 3 TESTS 9 62 5734400
368585245 20924909 B March 28, 2026, 4:43 p.m. OK Python 3 TESTS 9 62 7270400
368582109 final3blindside B March 28, 2026, 4:34 p.m. OK Python 3 TESTS 9 62 7884800
368587317 lemonv1106 B March 28, 2026, 4:50 p.m. OK Python 3 TESTS 9 62 7987200
368587335 Smartzz B March 28, 2026, 4:50 p.m. OK Python 3 TESTS 9 78 7270400
368592196 charchit.manwatkar B March 28, 2026, 5:06 p.m. OK Python 3 TESTS 9 93 2560000
368583277 GagikMelkumyan B March 28, 2026, 4:38 p.m. OK Python 3 TESTS 9 93 6451200
368582396 abrahimladha B March 28, 2026, 4:35 p.m. OK Python 3 TESTS 9 109 2969600
368594606 K_ks B March 28, 2026, 5:13 p.m. OK Python 3 TESTS 9 109 6553600
368584116 entfane B March 28, 2026, 4:40 p.m. OK Python 3 TESTS 9 125 2560000
368587790 _JG_ B March 28, 2026, 4:51 p.m. OK Rust 2024 TESTS 9 78 0

remove filters

Back to search problems