Codeforces Round 1000 (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
2063 Codeforces Round 1000 (Div. 2) FINISHED False 7200 38858123 Jan. 22, 2025, 12:05 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 23072 ) B Subsequence Update PROGRAMMING greedy sortings

But as they are a crucial part of home design, Little John decides to hide some in the most unreachable places — under the eco-friendly wood veneers. You are given an integer sequence (a_1, a_2, \ldots, a_n), and a segment (l,r) ((1 \le l \le r \le n)). You must perform the following operation on the sequence exactly once . Choose any subsequence (^{\text{∗}}) of the sequence (a), and reverse it. Note that the subsequence does not have to be contiguous. Formally, choose any number of indices (i_1,i_2,\ldots,i_k) such that (1 \le i_1 < i_2 < \ldots < i_k \le n). Then, change the (i_x)-th element to the original value of the (i_{k-x+1})-th element simultaneously for all (1 \le x \le k). Find the minimum value of (a_l+a_{l+1}+\ldots+a_{r-1}+a_r) after performing the operation. (^{\text{∗}})A sequence (b) is a subsequence of a sequence (a) if (b) can be obtained from (a) by the deletion of several (possibly, zero or all) element from arbitrary positions. 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 three integers (n), (l), (r) ((1 \le l \le r \le n \le 10^5)) — the length of (a), and the segment (l,r). The second line of each test case contains (n) integers (a_1,a_2,\ldots,a_n) ((1 \le a_{i} \le 10^9)). It is guaranteed that the sum of (n) over all test cases does not exceed (10^5). For each test case, output the minimum value of (a_l+a_{l+1}+\ldots+a_{r-1}+a_r) on a separate line. On the second test case, the array is (a=1,2,3) and the segment is (2,3). After choosing the subsequence (a_1,a_3) and reversing it, the sequence becomes (3,2,1). Then, the sum (a_2+a_3) becomes (3). It can be shown that the minimum possible value of the sum is (3).

Tutorials

Codeforces Round 1000 (Div. 2) — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
302504630 R2__D2 B Jan. 22, 2025, 6:32 p.m. OK C# 10 TESTS 13 124 11059200
302467131 fREaK092 B Jan. 22, 2025, 2:56 p.m. OK C++17 (GCC 7-32) TESTS 10 61 307200
302551524 aquariuscc B Jan. 23, 2025, 6 a.m. OK C++17 (GCC 7-32) TESTS 13 62 0
302530108 johnsmith0x3f B Jan. 23, 2025, 1:06 a.m. OK C++17 (GCC 7-32) TESTS 13 62 102400
302539708 smart_kai B Jan. 23, 2025, 3:31 a.m. OK C++17 (GCC 7-32) TESTS 13 62 409600
302522624 _70856775ER_ B Jan. 22, 2025, 10:18 p.m. OK C++17 (GCC 7-32) TESTS 13 62 512000
302535580 xiongmaoguagua B Jan. 23, 2025, 2:35 a.m. OK C++17 (GCC 7-32) TESTS 13 62 1228800
302520248 julyforest42 B Jan. 22, 2025, 9:32 p.m. OK C++17 (GCC 7-32) TESTS 13 62 1228800
302535881 jiufeng B Jan. 23, 2025, 2:40 a.m. OK C++17 (GCC 7-32) TESTS 13 62 16076800
302530965 Elysia_lr B Jan. 23, 2025, 1:20 a.m. OK C++17 (GCC 7-32) TESTS 13 62 16076800
302551774 alankrit_07_ B Jan. 23, 2025, 6:03 a.m. OK C++17 (GCC 7-32) TESTS 13 77 0
302529555 3blatif B Jan. 23, 2025, 12:56 a.m. OK C++20 (GCC 13-64) TESTS 13 62 0
302528692 iAmJP B Jan. 23, 2025, 12:40 a.m. OK C++20 (GCC 13-64) TESTS 13 62 0
302527589 cmottao B Jan. 23, 2025, 12:20 a.m. OK C++20 (GCC 13-64) TESTS 13 62 0
302518890 21d46ef6 B Jan. 22, 2025, 9:07 p.m. OK C++20 (GCC 13-64) TESTS 13 62 0
302515412 Moloy10 B Jan. 22, 2025, 8:16 p.m. OK C++20 (GCC 13-64) TESTS 13 62 0
302514699 yash_siwach B Jan. 22, 2025, 8:07 p.m. OK C++20 (GCC 13-64) TESTS 13 62 0
302504051 Stargazer_jeet B Jan. 22, 2025, 6:28 p.m. OK C++20 (GCC 13-64) TESTS 13 62 0
302502329 dlucoding813 B Jan. 22, 2025, 6:16 p.m. OK C++20 (GCC 13-64) TESTS 13 62 0
302494443 mishra_376 B Jan. 22, 2025, 5:26 p.m. OK C++20 (GCC 13-64) TESTS 13 62 0
302485969 lakshmankattunga B Jan. 22, 2025, 4:34 p.m. OK C++20 (GCC 13-64) TESTS 13 62 0
302550733 EzazMahmud B Jan. 23, 2025, 5:52 a.m. OK C++23 (GCC 14-64, msys2) TESTS 13 62 0
302542530 im_Leo B Jan. 23, 2025, 4:09 a.m. OK C++23 (GCC 14-64, msys2) TESTS 13 62 0
302541148 Osama_Elkhadrawy B Jan. 23, 2025, 3:51 a.m. OK C++23 (GCC 14-64, msys2) TESTS 13 62 0
302536771 TosakaUCW B Jan. 23, 2025, 2:53 a.m. OK C++23 (GCC 14-64, msys2) TESTS 13 62 0
302535601 Laoqiang--wiLLAC B Jan. 23, 2025, 2:36 a.m. OK C++23 (GCC 14-64, msys2) TESTS 13 62 0
302522233 .I. B Jan. 22, 2025, 10:10 p.m. OK C++23 (GCC 14-64, msys2) TESTS 13 62 0
302473683 Fusu B Jan. 22, 2025, 3:24 p.m. OK C++23 (GCC 14-64, msys2) TESTS 12 62 0
302468749 Demon_Slayer B Jan. 22, 2025, 3:02 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 62 0
302468283 rewhile B Jan. 22, 2025, 3 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 62 0
302467304 workingyashsharma B Jan. 22, 2025, 2:57 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 62 0
302518865 zerojanuary B Jan. 22, 2025, 9:06 p.m. OK GNU C11 TESTS 13 77 921600
302472453 fnf47 B Jan. 22, 2025, 3:18 p.m. OK Go TESTS 12 109 2252800
302534904 ao_lang B Jan. 23, 2025, 2:24 a.m. OK Go TESTS 13 812 5734400
302532433 Zhanzhe_Lee B Jan. 23, 2025, 1:43 a.m. OK Java 21 TESTS 13 265 921600
302551589 amit_roy B Jan. 23, 2025, 6:01 a.m. OK Java 21 TESTS 13 265 1126400
302512154 shre99 B Jan. 22, 2025, 7:37 p.m. OK Java 21 TESTS 13 296 819200
302495189 DasVidanIya B Jan. 22, 2025, 5:31 p.m. OK Java 21 TESTS 13 311 2150400
302470353 yuvrajye B Jan. 22, 2025, 3:09 p.m. OK Java 21 TESTS 11 312 512000
302539556 shaili17 B Jan. 23, 2025, 3:29 a.m. OK Java 21 TESTS 13 312 1740800
302548037 AKhacks B Jan. 23, 2025, 5:20 a.m. OK Java 21 TESTS 13 327 409600
302471551 Sage_Eklavya B Jan. 22, 2025, 3:14 p.m. OK Java 21 TESTS 12 328 512000
302507769 kyokun B Jan. 22, 2025, 6:57 p.m. OK Java 21 TESTS 13 343 2560000
302505400 y_a_s B Jan. 22, 2025, 6:38 p.m. OK Java 21 TESTS 13 343 3481600
302470939 Kuuuuuuuuu B Jan. 22, 2025, 3:11 p.m. OK Java 8 TESTS 11 202 0
302460411 coder_kpy B Jan. 22, 2025, 2:03 p.m. OK Java 8 TESTS 10 218 102400
302474796 CipherSphinx_Raj B Jan. 22, 2025, 3:30 p.m. OK Java 8 TESTS 13 233 39833600
302470981 Akshat_Gupta._ B Jan. 22, 2025, 3:12 p.m. OK Java 8 TESTS 11 234 204800
302536321 ishurajora_23 B Jan. 23, 2025, 2:47 a.m. OK Java 8 TESTS 13 296 0
302522278 Rajatmah26 B Jan. 22, 2025, 10:11 p.m. OK Java 8 TESTS 13 296 0
302535414 chuyang_10_30 B Jan. 23, 2025, 2:32 a.m. OK Java 8 TESTS 13 312 0
302530085 wawa333666 B Jan. 23, 2025, 1:05 a.m. OK Java 8 TESTS 13 312 0
302485445 mzip B Jan. 22, 2025, 4:31 p.m. OK Java 8 TESTS 13 312 0
302520553 mintshock B Jan. 22, 2025, 9:38 p.m. OK Java 8 TESTS 13 327 0
302514514 blargz B Jan. 22, 2025, 8:05 p.m. OK Node.js TESTS 13 265 17510400
302483798 Code.Virtuoso B Jan. 22, 2025, 4:21 p.m. OK PyPy 3 TESTS 13 374 11059200
302489075 golomb B Jan. 22, 2025, 4:54 p.m. OK PyPy 3 TESTS 13 405 14028800
302475418 Giantpanda B Jan. 22, 2025, 3:33 p.m. OK PyPy 3 TESTS 13 406 10649600
302479164 AmirHoseinEsmailie B Jan. 22, 2025, 3:54 p.m. OK PyPy 3-64 TESTS 13 140 16076800
302516798 AmirHoseinEsmailie B Jan. 22, 2025, 8:35 p.m. OK PyPy 3-64 TESTS 13 140 16281600
302521845 nikokalm B Jan. 22, 2025, 10:02 p.m. OK PyPy 3-64 TESTS 13 171 13721600
302540810 KudoConan B Jan. 23, 2025, 3:46 a.m. OK PyPy 3-64 TESTS 13 171 15872000
302480144 AmirHoseinEsmailie B Jan. 22, 2025, 3:59 p.m. OK PyPy 3-64 TESTS 13 171 16076800
302477090 AmirHoseinEsmailie B Jan. 22, 2025, 3:42 p.m. OK PyPy 3-64 TESTS 13 171 16076800
302476896 AmirHoseinEsmailie B Jan. 22, 2025, 3:41 p.m. OK PyPy 3-64 TESTS 13 171 16281600
302486619 maruf_khan96 B Jan. 22, 2025, 4:38 p.m. OK PyPy 3-64 TESTS 13 171 16384000
302479648 AmirHoseinEsmailie B Jan. 22, 2025, 3:56 p.m. OK PyPy 3-64 TESTS 13 186 16384000
302483743 filliones B Jan. 22, 2025, 4:21 p.m. OK PyPy 3-64 TESTS 13 186 18534400
302530692 Doobligation B Jan. 23, 2025, 1:16 a.m. OK Python 3 TESTS 13 124 14028800
302520594 eugalt B Jan. 22, 2025, 9:39 p.m. OK Python 3 TESTS 13 139 13824000
302461231 Adhvaithks B Jan. 22, 2025, 2:04 p.m. OK Python 3 TESTS 10 139 13824000
302521127 eugalt B Jan. 22, 2025, 9:48 p.m. OK Python 3 TESTS 13 140 13824000
302477077 stalgatuly B Jan. 22, 2025, 3:42 p.m. OK Python 3 TESTS 13 140 13824000
302529009 HVVH B Jan. 23, 2025, 12:46 a.m. OK Python 3 TESTS 13 155 13824000
302500366 Pilgrim1043 B Jan. 22, 2025, 6:04 p.m. OK Python 3 TESTS 13 156 13824000
302534925 Otrajenie_1 B Jan. 23, 2025, 2:25 a.m. OK Python 3 TESTS 13 156 81408000
302513548 vaik B Jan. 22, 2025, 7:52 p.m. OK Python 3 TESTS 13 171 13414400
302467259 liuhenggang692562665 B Jan. 22, 2025, 2:56 p.m. OK Python 3 TESTS 10 171 13619200
302476362 kalinov B Jan. 22, 2025, 3:38 p.m. OK Rust 2021 TESTS 13 62 102400
302480659 vstiff B Jan. 22, 2025, 4:02 p.m. OK Rust 2021 TESTS 13 62 1024000

remove filters

Back to search problems