Codeforces Round 778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round)

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
1654 Codeforces Round 778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) FINISHED False 8100 84047099 March 20, 2022, 11:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2103 ) E Arithmetic Operations PROGRAMMING brute force divide and conquer graphs math 2300

B'You are given an array of integers a_1, a_2, ldots, a_n . You can do the following operation any number of times (possibly zero): What is the minimum number of operations needed to turn a into an arithmetic progression? The array a is an arithmetic progression if a_{i+1}-a_i=a_i-a_{i-1} for any 2 <= q i <= q n-1 . The first line contains a single integer n ( 1 <= n <= 10^5 ). The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= q 10^5 ). Print a single integer: the minimum number of operations needed to turn a into an arithmetic progression. In the first test, you can get the array a = [11, 10, 9, 8, 7, 6, 5, 4, 3] by performing 6 operations: a is an arithmetic progression: in fact, a_{i+1}-a_i=a_i-a_{i-1}=-1 for any 2 <= q i <= q n-1 . There is no sequence of less than 6 operations that makes a an arithmetic progression. In the second test, you can get the array a = [-1, 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38] by performing 10 operations. In the third test, you can get the array a = [100000, 80000, 60000, 40000, 20000, 0, -20000, -40000, -60000, -80000] by performing 7 operations. '...

Tutorials

Editorial of Codeforces Round #778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
150267074 Gassa E March 20, 2022, 1:32 p.m. OK D TESTS 71 4679 264192000 2300
150309398 Atziluth E March 20, 2022, 11:14 p.m. OK GNU C++14 TESTS 78 1231 30105600 2300
150309342 Atziluth E March 20, 2022, 11:11 p.m. OK GNU C++14 TESTS 78 1232 30515200 2300
150309413 Atziluth E March 20, 2022, 11:14 p.m. OK GNU C++14 TESTS 78 1278 30105600 2300
150309372 Atziluth E March 20, 2022, 11:13 p.m. OK GNU C++14 TESTS 78 1310 29696000 2300
150309332 Atziluth E March 20, 2022, 11:11 p.m. OK GNU C++14 TESTS 78 1310 31232000 2300
150309383 Atziluth E March 20, 2022, 11:13 p.m. OK GNU C++14 TESTS 78 1326 30822400 2300
150311078 uniqueharry E March 21, 2022, 12:08 a.m. OK GNU C++14 TESTS 78 1326 81408000 2300
150309285 Atziluth E March 20, 2022, 11:10 p.m. OK GNU C++14 TESTS 78 1341 32460800 2300
150309313 Atziluth E March 20, 2022, 11:10 p.m. OK GNU C++14 TESTS 78 1435 28467200 2300
150309007 Atziluth E March 20, 2022, 11 p.m. OK GNU C++14 TESTS 78 1450 24473600 2300
150286207 maxplus E March 20, 2022, 4:37 p.m. OK GNU C++17 TESTS 74 842 32256000 2300
150286114 maxplus E March 20, 2022, 4:36 p.m. OK GNU C++17 TESTS 74 858 32256000 2300
150286130 maxplus E March 20, 2022, 4:36 p.m. OK GNU C++17 TESTS 74 998 32256000 2300
150263823 Rescuring E March 20, 2022, 1:17 p.m. OK GNU C++17 TESTS 71 998 64204800 2300
150286258 maxplus E March 20, 2022, 4:38 p.m. OK GNU C++17 TESTS 74 1029 32256000 2300
150275201 wanghaoze E March 20, 2022, 2:50 p.m. OK GNU C++17 TESTS 71 1340 81408000 2300
150268650 tnowak E March 20, 2022, 1:39 p.m. OK GNU C++17 TESTS 71 1606 81817600 2300
150265238 klimoza E March 20, 2022, 1:24 p.m. OK GNU C++17 TESTS 71 1824 122368000 2300
150280171 CWB_the_most_powerful E March 20, 2022, 3:32 p.m. OK GNU C++17 TESTS 74 1856 200806400 2300
150290223 RoundRoundUP E March 20, 2022, 5:23 p.m. OK GNU C++17 TESTS 75 1902 201216000 2300
150317348 SanweiTreap E March 21, 2022, 3:24 a.m. OK GNU C++17 (64) TESTS 78 702 64000000 2300
150318133 SegmentMaster E March 21, 2022, 3:44 a.m. OK GNU C++17 (64) TESTS 78 1232 200806400 2300
150262373 Arraiter E March 20, 2022, 1:10 p.m. OK GNU C++17 (64) TESTS 71 1248 8396800 2300
150315028 xxafhixx E March 21, 2022, 2:21 a.m. OK GNU C++17 (64) TESTS 78 1263 281190400 2300
150314889 xxafhixx E March 21, 2022, 2:17 a.m. OK GNU C++17 (64) TESTS 78 1372 281190400 2300
150277125 Siberian E March 20, 2022, 3:04 p.m. OK GNU C++17 (64) TESTS 73 1388 99225600 2300
150291810 TITANOBOXER E March 20, 2022, 5:40 p.m. OK GNU C++17 (64) TESTS 75 1403 86220800 2300
150315047 xxafhixx E March 21, 2022, 2:22 a.m. OK GNU C++17 (64) TESTS 78 1434 281190400 2300
150277249 Siberian E March 20, 2022, 3:05 p.m. OK GNU C++17 (64) TESTS 74 1544 103219200 2300
150326270 fork E March 21, 2022, 5:59 a.m. OK GNU C++17 (64) TESTS 78 1575 162508800 2300
150285746 maxplus E March 20, 2022, 4:32 p.m. OK GNU C++20 (64) TESTS 74 795 32256000 2300
150282800 maxplus E March 20, 2022, 3:59 p.m. OK GNU C++20 (64) TESTS 74 795 53555200 2300
150281700 maxplus E March 20, 2022, 3:48 p.m. OK GNU C++20 (64) TESTS 74 795 53555200 2300
150285346 maxplus E March 20, 2022, 4:27 p.m. OK GNU C++20 (64) TESTS 74 826 32256000 2300
150284847 maxplus E March 20, 2022, 4:21 p.m. OK GNU C++20 (64) TESTS 74 826 32256000 2300
150283935 maxplus E March 20, 2022, 4:11 p.m. OK GNU C++20 (64) TESTS 74 826 32256000 2300
150280054 maxplus E March 20, 2022, 3:31 p.m. OK GNU C++20 (64) TESTS 74 826 53555200 2300
150279264 maxplus E March 20, 2022, 3:23 p.m. OK GNU C++20 (64) TESTS 74 826 53555200 2300
150283217 maxplus E March 20, 2022, 4:04 p.m. OK GNU C++20 (64) TESTS 74 841 32256000 2300
150283279 maxplus E March 20, 2022, 4:04 p.m. OK GNU C++20 (64) TESTS 74 857 32256000 2300
150263217 knightL E March 20, 2022, 1:14 p.m. OK Java 11 TESTS 71 2137 614400 2300
150311061 YahiaSherif E March 21, 2022, 12:07 a.m. OK Java 11 TESTS 78 4461 160972800 2300
150295064 Restricted E March 20, 2022, 6:23 p.m. OK Java 11 TESTS 75 4835 803737600 2300
150279228 Sparky_Master_WCH1226 E March 20, 2022, 3:23 p.m. OK Kotlin 1.4 TESTS 74 1637 3276800 2300
150292262 gchebanov E March 20, 2022, 5:46 p.m. OK MS C++ 2017 TESTS 75 4289 7168000 2300
150281765 NecroSean38 E March 20, 2022, 3:48 p.m. OK PyPy 3 TESTS 74 4773 271667200 2300
150285398 sansen E March 20, 2022, 4:28 p.m. OK Rust 2021 TESTS 74 2105 6144000 2300
150285621 sansen E March 20, 2022, 4:30 p.m. OK Rust 2021 TESTS 74 2807 6144000 2300
150314645 Spheniscine E March 21, 2022, 2:09 a.m. OK Rust 2021 TESTS 78 2963 160153600 2300
150313506 Spheniscine E March 21, 2022, 1:31 a.m. OK Rust 2021 TESTS 78 3306 160153600 2300
150313049 Spheniscine E March 21, 2022, 1:13 a.m. OK Rust 2021 TESTS 78 3572 160460800 2300

remove filters

Back to search problems