Codeforces Round 1065 (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
2171 Codeforces Round 1065 (Div. 3) FINISHED False 9000 12756323 Nov. 20, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 998 ) H Shiori Miyagi and Maximum Array Score PROGRAMMING binary search data structures dp

For the cost of 5000 yen, Miyagi can ask Sendai to do whatever she wants! Today, Miyagi demands that Sendai make her an array... specifically, Miyagi only wants a very particular type of array. For arbitrary integers (b\geq 2) and (x\geq 1), define (v(b, x)) to be the maximal (k) satisfying (b^k \mid x); that is, the maximal (k) such that (x) is a multiple of (b^k). It can be shown that this is always a well-defined, nonnegative integer. You are given integers (n) and (m) satisfying (n\leq m). Find the maximum value of (\sum_{i=2}^n v(i, a_i)) across all arrays (a) of length (n) satisfying the following conditions: (a) is strictly increasing ; that is, for all (1\leq i\leq n-1), (a_i < a_{i+1}), and for all (1\leq i\leq n), (1\leq a_i\leq m). The first line contains a single integer (t) ((1 \leq t \leq 10^4)) — the number of test cases. The only line of each test case contains two integers (n) and (m) ((2\leq n\leq m \leq 2\cdot 10^5)). It is guaranteed that the sum of (m) over all test cases does not exceed (2\cdot 10^5). For each test case, output a single integer, the maximum value of (\sum_{i=2}^n v(i, a_i)) across all arrays (a) of length (n) satisfying the given conditions. In the first example, one possible array is (a = 6, 8, 9, 16) which yields a value of (3 + 2 + 2 = 7). It can be shown that this is the maximum value of (\sum_{i=2}^n v(i, a_i)) across all arrays (a) of length (n) satisfying the given conditions.

Tutorials

Codeforces Round 1065 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
349998175 -adhd- H Nov. 20, 2025, 9:40 p.m. OK C++17 (GCC 7-32) TESTS 33 93 0
350093736 alif_cse_ju H Nov. 21, 2025, 4:05 p.m. OK C++17 (GCC 7-32) TESTS 33 109 0
350034580 afarstic H Nov. 21, 2025, 8:22 a.m. OK C++17 (GCC 7-32) TESTS 33 109 0
350009304 antguz H Nov. 21, 2025, 2:20 a.m. OK C++17 (GCC 7-32) TESTS 33 109 819200
350081157 eirinayukari H Nov. 21, 2025, 2:35 p.m. OK C++17 (GCC 7-32) TESTS 33 139 0
350016908 Jimmy2021 H Nov. 21, 2025, 4:27 a.m. OK C++17 (GCC 7-32) TESTS 33 140 819200
350113718 ikaurov H Nov. 21, 2025, 6:41 p.m. OK C++17 (GCC 7-32) TESTS 33 171 0
350036133 xiangixuan H Nov. 21, 2025, 8:35 a.m. OK C++17 (GCC 7-32) TESTS 33 186 0
350033915 kimnattanan H Nov. 21, 2025, 8:16 a.m. OK C++17 (GCC 7-32) TESTS 33 202 819200
350067997 Moya_Rao H Nov. 21, 2025, 12:57 p.m. OK C++17 (GCC 7-32) TESTS 33 202 1638400
350061516 KINnaoinza H Nov. 21, 2025, 12:05 p.m. OK C++20 (GCC 13-64) TESTS 33 92 0
350006816 oranger_20 H Nov. 21, 2025, 1:28 a.m. OK C++20 (GCC 13-64) TESTS 33 93 0
350094077 arodnap33 H Nov. 21, 2025, 4:07 p.m. OK C++20 (GCC 13-64) TESTS 33 109 0
350009159 marcoq2025 H Nov. 21, 2025, 2:17 a.m. OK C++20 (GCC 13-64) TESTS 33 109 0
350006314 kmv___ H Nov. 21, 2025, 1:17 a.m. OK C++20 (GCC 13-64) TESTS 33 109 0
350153818 yet_Wicton H Nov. 22, 2025, 6:01 a.m. OK C++20 (GCC 13-64) TESTS 33 124 0
350148389 remain11 H Nov. 22, 2025, 4:50 a.m. OK C++20 (GCC 13-64) TESTS 33 124 0
349992779 ALAov H Nov. 20, 2025, 8:21 p.m. OK C++20 (GCC 13-64) TESTS 33 124 0
350133539 turkhuu622 H Nov. 21, 2025, 11:06 p.m. OK C++20 (GCC 13-64) TESTS 33 124 2457600
350073330 Oanh_va_Khoi H Nov. 21, 2025, 1:38 p.m. OK C++20 (GCC 13-64) TESTS 33 125 0
350103461 smz.26 H Nov. 21, 2025, 5:20 p.m. OK C++23 (GCC 14-64, msys2) TESTS 33 93 0
350049403 Underrated_Alpha H Nov. 21, 2025, 10:21 a.m. OK C++23 (GCC 14-64, msys2) TESTS 33 93 0
350010513 hungchi17 H Nov. 21, 2025, 2:43 a.m. OK C++23 (GCC 14-64, msys2) TESTS 33 93 0
350004016 krit3379 H Nov. 21, 2025, 12:13 a.m. OK C++23 (GCC 14-64, msys2) TESTS 33 108 0
349991769 bonopo H Nov. 20, 2025, 8:08 p.m. OK C++23 (GCC 14-64, msys2) TESTS 33 108 819200
350081666 Leaper_lyc H Nov. 21, 2025, 2:39 p.m. OK C++23 (GCC 14-64, msys2) TESTS 33 109 0
350047136 Uakkes H Nov. 21, 2025, 10:02 a.m. OK C++23 (GCC 14-64, msys2) TESTS 33 109 0
350011982 gddwt H Nov. 21, 2025, 3:07 a.m. OK C++23 (GCC 14-64, msys2) TESTS 33 109 819200
350153395 Sparky_ H Nov. 22, 2025, 5:56 a.m. OK C++23 (GCC 14-64, msys2) TESTS 33 124 0
350119339 Codesystem H Nov. 21, 2025, 7:30 p.m. OK C++23 (GCC 14-64, msys2) TESTS 33 124 0
350143778 gxlois H Nov. 22, 2025, 3:27 a.m. OK D TESTS 33 734 2969600
350071916 shlok_patel H Nov. 21, 2025, 1:27 p.m. OK GNU C11 TESTS 33 233 4198400
350008102 0x3F H Nov. 21, 2025, 1:56 a.m. OK Go TESTS 33 202 1945600
350151592 MainAgain H Nov. 22, 2025, 5:35 a.m. OK Go TESTS 33 2062 55705600
350001001 gua069 H Nov. 20, 2025, 10:40 p.m. OK Java 8 TESTS 33 1703 0
350014340 IcyGirl H Nov. 21, 2025, 3:43 a.m. OK PyPy 3-64 TESTS 33 312 10444800
350009148 Little_Sheep_Yawn H Nov. 21, 2025, 2:17 a.m. OK PyPy 3-64 TESTS 33 343 9011200
350077985 ericshen19555 H Nov. 21, 2025, 2:11 p.m. OK PyPy 3-64 TESTS 33 374 5427200
349992021 RanjanV_1 H Nov. 20, 2025, 8:12 p.m. OK PyPy 3-64 TESTS 33 374 9011200
350008331 VaHiX H Nov. 21, 2025, 2:01 a.m. OK PyPy 3-64 TESTS 33 421 9011200
350014257 IcyGirl H Nov. 21, 2025, 3:41 a.m. OK PyPy 3-64 TESTS 33 467 11161600
350078785 PVHKReddy H Nov. 21, 2025, 2:18 p.m. OK PyPy 3-64 TESTS 33 577 10137600
350013832 IcyGirl H Nov. 21, 2025, 3:34 a.m. OK PyPy 3-64 TESTS 33 749 10547200
350067843 hjyiduobohj H Nov. 21, 2025, 12:56 p.m. OK PyPy 3-64 TESTS 33 780 6348800
350014220 IcyGirl H Nov. 21, 2025, 3:41 a.m. OK PyPy 3-64 TESTS 33 781 10649600

remove filters

Back to search problems