Codeforces Round 925 (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
1931 Codeforces Round 925 (Div. 3) FINISHED False 8100 29345063 Feb. 13, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 30015 ) C Make Equal Again PROGRAMMING brute force greedy math

B'You have an array a of n integers. You can no more than once apply the following operation: select three integers i , j , x ( 1 <= i <= j <= n ) and assign all elements of the array with indexes from i to j the value x . The price of this operation depends on the selected indices and is equal to (j - i + 1) burles. For example, the array is equal to [1, 2, 3, 4, 5, 1] . If we choose i = 2, j = 4, x = 8 , then after applying this operation, the array will be equal to [1, 8, 8, 8, 5, 1] . What is the least amount of burles you need to spend to make all the elements of the array equal? The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of input test cases. The descriptions of the test cases follow. The first line of the description of each test case contains a single integer n ( 1 <= n <= 2 cdot 10 ^ 5 ) -- the size of the array. The second line of the description of each test case contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= n ) -- array elements. It is guaranteed that the sum of n for all test cases does not exceed 2 cdot 10^5 . For each test case, output one integer -- the minimum number of burles that will have to be spent to make all the elements of the array equal. It can be shown that this can always be done. '...

Tutorials

125878

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
246300647 bluemegane C Feb. 14, 2024, 1:44 a.m. OK C# 8 TESTS 6 171 15462400
246300123 Jethalal.Gada C Feb. 14, 2024, 1:28 a.m. OK Clang++20 Diagnostics TESTS 6 779 819200
246270669 srihari.p114 C Feb. 13, 2024, 6:12 p.m. OK Clang++20 Diagnostics TESTS 6 779 819200
246257481 Shreyas_Chougaonkar C Feb. 13, 2024, 4:59 p.m. OK GNU C11 TESTS 6 31 819200
246270082 DarkWillow C Feb. 13, 2024, 6:08 p.m. OK GNU C11 TESTS 6 46 819200
246269670 DarkWillow C Feb. 13, 2024, 6:05 p.m. OK GNU C11 TESTS 6 46 819200
246272556 richiesuper C Feb. 13, 2024, 6:26 p.m. OK GNU C11 TESTS 6 46 1024000
246273160 gana_bhata C Feb. 13, 2024, 6:31 p.m. OK GNU C11 TESTS 6 46 1024000
246274141 ahamshubham C Feb. 13, 2024, 6:39 p.m. OK GNU C11 TESTS 6 46 1024000
246276986 klassyrahul C Feb. 13, 2024, 7:04 p.m. OK GNU C11 TESTS 6 46 1024000
246283490 Aditya_nath_5002 C Feb. 13, 2024, 8:06 p.m. OK GNU C11 TESTS 6 46 1024000
246274440 Himanshu0076 C Feb. 13, 2024, 6:41 p.m. OK GNU C11 TESTS 6 61 1024000
246279812 realanonymusic C Feb. 13, 2024, 7:30 p.m. OK GNU C11 TESTS 6 62 819200
246309204 X_u0 C Feb. 14, 2024, 4:26 a.m. OK GNU C++17 TESTS 6 31 819200
246258782 ferdous15 C Feb. 13, 2024, 5:04 p.m. OK GNU C++17 TESTS 6 31 819200
246311002 anshu1609 C Feb. 14, 2024, 4:52 a.m. OK GNU C++17 TESTS 6 46 819200
246315397 ad_101100 C Feb. 14, 2024, 5:46 a.m. OK GNU C++17 TESTS 6 46 819200
246314835 nguyenvanhhung8 C Feb. 14, 2024, 5:40 a.m. OK GNU C++17 TESTS 6 46 819200
246314710 Unlucky_girl_out_there C Feb. 14, 2024, 5:38 a.m. OK GNU C++17 TESTS 6 46 819200
246313213 Sanchit_g25 C Feb. 14, 2024, 5:19 a.m. OK GNU C++17 TESTS 6 46 819200
246313136 ruoan C Feb. 14, 2024, 5:19 a.m. OK GNU C++17 TESTS 6 46 819200
246313034 Sunstone C Feb. 14, 2024, 5:18 a.m. OK GNU C++17 TESTS 6 46 819200
246312779 Not_Rated C Feb. 14, 2024, 5:14 a.m. OK GNU C++17 TESTS 6 46 819200
246310414 de_Brogile C Feb. 14, 2024, 4:45 a.m. OK GNU C++17 (64) TESTS 6 30 819200
246300801 crescentmoon47 C Feb. 14, 2024, 1:48 a.m. OK GNU C++17 (64) TESTS 6 30 1638400
246289258 AbhishekSikarwar C Feb. 13, 2024, 9:19 p.m. OK GNU C++17 (64) TESTS 6 31 819200
246290154 AbhishekSikarwar C Feb. 13, 2024, 9:32 p.m. OK GNU C++17 (64) TESTS 6 31 819200
246295964 hope.it.helps C Feb. 13, 2024, 11:30 p.m. OK GNU C++17 (64) TESTS 6 31 819200
246276489 AALoOo C Feb. 13, 2024, 7 p.m. OK GNU C++17 (64) TESTS 6 31 819200
246302428 hatsuyufei C Feb. 14, 2024, 2:27 a.m. OK GNU C++17 (64) TESTS 6 31 819200
246315021 VitrelosTia C Feb. 14, 2024, 5:42 a.m. OK GNU C++17 (64) TESTS 6 31 819200
246300982 ztwanan20 C Feb. 14, 2024, 1:52 a.m. OK GNU C++17 (64) TESTS 6 31 819200
246276565 MaDZOZO C Feb. 13, 2024, 7:01 p.m. OK GNU C++17 (64) TESTS 6 31 819200
246310134 _no__way C Feb. 14, 2024, 4:41 a.m. OK GNU C++20 (64) TESTS 6 15 819200
246305132 _Kawsar_ C Feb. 14, 2024, 3:20 a.m. OK GNU C++20 (64) TESTS 6 15 819200
246294242 Qpxwyzdfsbfsphiepsilon C Feb. 13, 2024, 10:48 p.m. OK GNU C++20 (64) TESTS 6 15 819200
246293121 Som3a-Mo C Feb. 13, 2024, 10:23 p.m. OK GNU C++20 (64) TESTS 6 15 819200
246284178 The_Logic C Feb. 13, 2024, 8:13 p.m. OK GNU C++20 (64) TESTS 6 15 819200
246281517 Tawkir_Ahmed C Feb. 13, 2024, 7:46 p.m. OK GNU C++20 (64) TESTS 6 15 819200
246279376 nihal_gupta C Feb. 13, 2024, 7:26 p.m. OK GNU C++20 (64) TESTS 6 15 819200
246277740 AbduSaber C Feb. 13, 2024, 7:11 p.m. OK GNU C++20 (64) TESTS 6 15 819200
246276255 polsage C Feb. 13, 2024, 6:58 p.m. OK GNU C++20 (64) TESTS 6 15 819200
246265361 Arpitsri_33 C Feb. 13, 2024, 5:38 p.m. OK GNU C++20 (64) TESTS 6 15 819200
246257618 euclidstellar C Feb. 13, 2024, 4:59 p.m. OK Go TESTS 6 46 3174400
246259332 aishwarykesarwani C Feb. 13, 2024, 5:06 p.m. OK Java 21 TESTS 6 217 0
246295294 powervic08 C Feb. 13, 2024, 11:13 p.m. OK Java 21 TESTS 6 249 0
246277807 vishal2003gaikwad C Feb. 13, 2024, 7:12 p.m. OK Java 21 TESTS 6 249 0
246276184 dzhi C Feb. 13, 2024, 6:57 p.m. OK Java 21 TESTS 6 249 102400
246300761 ktcat C Feb. 14, 2024, 1:47 a.m. OK Java 21 TESTS 6 249 204800
246304188 Nick C Feb. 14, 2024, 3:03 a.m. OK Java 21 TESTS 6 264 102400
246272427 Abood19 C Feb. 13, 2024, 6:25 p.m. OK Java 21 TESTS 6 265 0
246270134 spiralJava_ C Feb. 13, 2024, 6:09 p.m. OK Java 21 TESTS 6 265 0
246276094 Last-Huntsman C Feb. 13, 2024, 6:56 p.m. OK Java 21 TESTS 6 280 0
246311682 fightingxjz C Feb. 14, 2024, 5:01 a.m. OK Java 21 TESTS 6 280 102400
246299134 soulnote C Feb. 14, 2024, 12:58 a.m. OK Java 8 TESTS 6 124 1843200
246289292 Pranav_Sharda C Feb. 13, 2024, 9:19 p.m. OK Java 8 TESTS 6 139 1945600
246279362 Indrajit C Feb. 13, 2024, 7:26 p.m. OK Java 8 TESTS 6 155 5836800
246303982 Sumitsingh7 C Feb. 14, 2024, 3 a.m. OK Java 8 TESTS 6 171 5836800
246287506 abbasslb C Feb. 13, 2024, 8:53 p.m. OK Java 8 TESTS 6 296 0
246287477 abbassnaim122 C Feb. 13, 2024, 8:53 p.m. OK Java 8 TESTS 6 296 0
246307857 rohilkadam36 C Feb. 14, 2024, 4:04 a.m. OK Java 8 TESTS 6 311 0
246266572 priyanshu1520 C Feb. 13, 2024, 5:45 p.m. OK Java 8 TESTS 6 311 0
246308846 coderman2004 C Feb. 14, 2024, 4:20 a.m. OK Java 8 TESTS 6 326 0
246275296 superyash C Feb. 13, 2024, 6:49 p.m. OK Java 8 TESTS 6 343 0
246281157 kaaamKaaaam C Feb. 13, 2024, 7:43 p.m. OK MS C++ 2017 TESTS 6 124 1638400
246306155 Abhay_Sharma C Feb. 14, 2024, 3:38 a.m. OK MS C++ 2017 TESTS 6 140 819200
246263385 SC-Orange-Peel C Feb. 13, 2024, 5:26 p.m. OK MS C++ 2017 TESTS 6 140 819200
246295139 gani20 C Feb. 13, 2024, 11:09 p.m. OK MS C++ 2017 TESTS 6 156 1433600
246261589 gozeldowletowa2006 C Feb. 13, 2024, 5:16 p.m. OK PascalABC.NET TESTS 6 234 3276800
246263560 crapcode C Feb. 13, 2024, 5:27 p.m. OK PHP TESTS 6 62 29388800
246260222 sa_06 C Feb. 13, 2024, 5:10 p.m. OK PyPy 3 TESTS 6 373 11980800
246284732 avidNerd C Feb. 13, 2024, 8:19 p.m. OK PyPy 3 TESTS 6 390 16179200
246293479 xpoes C Feb. 13, 2024, 10:31 p.m. OK PyPy 3 TESTS 6 405 16179200
246289512 _oO_Oo_ C Feb. 13, 2024, 9:23 p.m. OK PyPy 3 TESTS 6 420 16281600
246299558 ashays C Feb. 14, 2024, 1:11 a.m. OK PyPy 3 TESTS 6 436 16179200
246271919 standoff C Feb. 13, 2024, 6:21 p.m. OK PyPy 3 TESTS 6 452 18841600
246286187 GabrielPortela C Feb. 13, 2024, 8:37 p.m. OK PyPy 3-64 TESTS 6 108 17612800
246294254 NitroSpear C Feb. 13, 2024, 10:48 p.m. OK PyPy 3-64 TESTS 6 124 19865600
246277863 jvatsal0709 C Feb. 13, 2024, 7:12 p.m. OK PyPy 3-64 TESTS 6 124 20889600
246259350 VeryLate C Feb. 13, 2024, 5:07 p.m. OK PyPy 3-64 TESTS 6 124 25088000
246266660 gardengnome C Feb. 13, 2024, 5:46 p.m. OK PyPy 3-64 TESTS 6 140 20377600
246300973 Tinky1224 C Feb. 14, 2024, 1:52 a.m. OK PyPy 3-64 TESTS 6 140 20889600
246264180 sbdkdlalit0112 C Feb. 13, 2024, 5:30 p.m. OK PyPy 3-64 TESTS 6 140 27443200
246276118 Mahesh_4444 C Feb. 13, 2024, 6:57 p.m. OK PyPy 3-64 TESTS 6 155 20889600
246305113 LCSB C Feb. 14, 2024, 3:20 a.m. OK PyPy 3-64 TESTS 6 156 20889600
246264560 Deecey01 C Feb. 13, 2024, 5:33 p.m. OK PyPy 3-64 TESTS 6 156 20889600
246261075 OLOGY C Feb. 13, 2024, 5:14 p.m. OK Python 2 TESTS 6 124 12492800
246298574 eugalt C Feb. 14, 2024, 12:41 a.m. OK Python 3 TESTS 6 93 22323200
246296636 eugalt C Feb. 13, 2024, 11:46 p.m. OK Python 3 TESTS 6 108 22937600
246274327 elistark C Feb. 13, 2024, 6:40 p.m. OK Python 3 TESTS 6 108 27852800
246275464 HClO C Feb. 13, 2024, 6:50 p.m. OK Python 3 TESTS 6 108 27955200
246279926 momenelmesady4803 C Feb. 13, 2024, 7:31 p.m. OK Python 3 TESTS 6 109 27136000
246262892 maruf_khan96 C Feb. 13, 2024, 5:23 p.m. OK Python 3 TESTS 6 109 27136000
246299227 VioletVal C Feb. 14, 2024, 1:02 a.m. OK Python 3 TESTS 6 109 27955200
246257462 Asif_Al_Fattah C Feb. 13, 2024, 4:59 p.m. OK Python 3 TESTS 6 109 27955200
246304752 neel_n_popat C Feb. 14, 2024, 3:13 a.m. OK Python 3 TESTS 6 124 19865600
246287036 vaibhav245 C Feb. 13, 2024, 8:47 p.m. OK Python 3 TESTS 6 124 26521600
246304444 Abnoxious C Feb. 14, 2024, 3:08 a.m. OK Rust 2021 TESTS 6 30 3993600

remove filters

Back to search problems