Educational Codeforces Round 127 (Rated for 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
1671 Educational Codeforces Round 127 (Rated for Div. 2) FINISHED False 7200 86628263 April 22, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7855 ) D Insert a Progression PROGRAMMING brute force constructive algorithms greedy

B"You are given a sequence of n integers a_1, a_2, ... , a_n . You are also given x integers 1, 2, ... , x . You are asked to insert each of the extra integers into the sequence a . Each integer can be inserted at the beginning of the sequence, at the end of the sequence, or between any elements of the sequence. The score of the resulting sequence a' is the sum of absolute differences of adjacent elements in it <= ft( sum limits_{i=1}^{n+x-1} |a'_i - a'_{i+1}| right) . What is the smallest possible score of the resulting sequence a' ? The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of testcases. The first line of each testcase contains two integers n and x ( 1 <= n, x <= 2 cdot 10^5 ) -- the length of the sequence and the number of extra integers. The second line of each testcase contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 2 cdot 10^5 ). The sum of n over all testcases doesn't exceed 2 cdot 10^5 . For each testcase, print a single integer -- the smallest sum of absolute differences of adjacent elements of the sequence after you insert the extra integers into it. Here are the sequences with the smallest scores for the example. The underlined elements are the extra integers. Note that there exist other sequences with this smallest score. "...

Tutorials

102181

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
154759264 fatherof0416 D April 23, 2022, 4:18 p.m. OK GNU C11 TESTS 39 78 1228800
154639591 Tom66 D April 23, 2022, 9:26 a.m. OK GNU C++14 TESTS 39 15 1638400
154858771 win10 D April 24, 2022, 1:51 p.m. OK GNU C++14 TESTS 39 15 3686400
154639587 vjudge3 D April 23, 2022, 9:26 a.m. OK GNU C++14 TESTS 39 31 1638400
154638960 cunzai_zsy0531 D April 23, 2022, 9:19 a.m. OK GNU C++14 TESTS 39 31 3379200
154623744 2018339901318 D April 23, 2022, 6:25 a.m. OK GNU C++14 TESTS 39 46 0
154633980 sillentGuardian D April 23, 2022, 8:26 a.m. OK GNU C++14 TESTS 39 46 1638400
154830047 myf D April 24, 2022, 9:03 a.m. OK GNU C++14 TESTS 39 46 17920000
154590755 Wizard_King D April 22, 2022, 7:09 p.m. OK GNU C++14 TESTS 39 61 819200
154607707 Tkver D April 23, 2022, 1:32 a.m. OK GNU C++14 TESTS 39 61 819200
154609921 duoluoluo D April 23, 2022, 2:26 a.m. OK GNU C++14 TESTS 39 61 819200
154631832 TomoriNao D April 23, 2022, 7:59 a.m. OK GNU C++17 TESTS 39 31 3686400
154611235 yukiki02 D April 23, 2022, 2:58 a.m. OK GNU C++17 TESTS 39 31 7372800
154618364 jhc_123 D April 23, 2022, 5:18 a.m. OK GNU C++17 TESTS 39 31 16793600
154810285 nvllable D April 24, 2022, 5:16 a.m. OK GNU C++17 TESTS 39 46 819200
154647216 lniiwuw_y D April 23, 2022, 10:50 a.m. OK GNU C++17 TESTS 39 46 819200
154628248 Mr.pawan_gupta D April 23, 2022, 7:15 a.m. OK GNU C++17 TESTS 39 46 819200
154865472 QuangBuiCP D April 24, 2022, 3:02 p.m. OK GNU C++17 TESTS 39 46 819200
154613003 masood_ D April 23, 2022, 3:38 a.m. OK GNU C++17 TESTS 39 46 1638400
154648775 KeeP__Going D April 23, 2022, 11:08 a.m. OK GNU C++17 TESTS 39 46 1638400
154782464 goku_786 D April 23, 2022, 7:06 p.m. OK GNU C++17 TESTS 39 46 1740800
154610305 dididadu D April 23, 2022, 2:35 a.m. OK GNU C++17 (64) TESTS 39 46 819200
154898754 openmi D April 25, 2022, 2:48 a.m. OK GNU C++17 (64) TESTS 39 46 819200
154816106 Wang_Yuan D April 24, 2022, 6:32 a.m. OK GNU C++17 (64) TESTS 39 46 819200
154785647 45muillaht D April 23, 2022, 7:53 p.m. OK GNU C++17 (64) TESTS 39 46 819200
154731790 Steins__Gate D April 23, 2022, 2:58 p.m. OK GNU C++17 (64) TESTS 39 46 819200
154636738 mysteri0us7 D April 23, 2022, 8:56 a.m. OK GNU C++17 (64) TESTS 39 46 819200
154628745 kal013 D April 23, 2022, 7:20 a.m. OK GNU C++17 (64) TESTS 39 46 819200
154624002 Rick_GT D April 23, 2022, 6:28 a.m. OK GNU C++17 (64) TESTS 39 46 819200
154612391 b4158813 D April 23, 2022, 3:24 a.m. OK GNU C++17 (64) TESTS 39 46 819200
154609382 guud222 D April 23, 2022, 2:13 a.m. OK GNU C++17 (64) TESTS 39 46 819200
154807107 HEltim7 D April 24, 2022, 4:19 a.m. OK GNU C++20 (64) TESTS 39 31 819200
154799524 tyler D April 24, 2022, 1:24 a.m. OK GNU C++20 (64) TESTS 39 31 819200
154796646 Swirl D April 23, 2022, 11:52 p.m. OK GNU C++20 (64) TESTS 39 31 819200
154786227 RP_21 D April 23, 2022, 8:03 p.m. OK GNU C++20 (64) TESTS 39 31 819200
154782433 teodoer D April 23, 2022, 7:06 p.m. OK GNU C++20 (64) TESTS 39 31 819200
154677459 Sangel D April 23, 2022, 1:10 p.m. OK GNU C++20 (64) TESTS 39 31 819200
154654881 clams D April 23, 2022, 12:18 p.m. OK GNU C++20 (64) TESTS 39 31 819200
154642404 KnahG D April 23, 2022, 9:56 a.m. OK GNU C++20 (64) TESTS 39 31 819200
154624865 Wolowitz D April 23, 2022, 6:38 a.m. OK GNU C++20 (64) TESTS 39 31 819200
154820300 needRemake D April 24, 2022, 7:19 a.m. OK GNU C++20 (64) TESTS 39 31 819200
154635574 MarcelShi_96 D April 23, 2022, 8:43 a.m. OK Go TESTS 39 140 3379200
154648692 glebsamsonov D April 23, 2022, 11:07 a.m. OK Go TESTS 39 217 2457600
154878269 legit_123 D April 24, 2022, 5:33 p.m. OK Java 11 TESTS 39 171 0
154609403 Longgggggggg D April 23, 2022, 2:14 a.m. OK Java 11 TESTS 39 186 0
154808368 aman_0 D April 24, 2022, 4:47 a.m. OK Java 11 TESTS 39 187 0
154627622 _ryan18_ D April 23, 2022, 7:07 a.m. OK Java 11 TESTS 39 218 0
154668530 Akash151101 D April 23, 2022, 12:55 p.m. OK Java 11 TESTS 39 218 0
154630315 eshan18.09 D April 23, 2022, 7:40 a.m. OK Java 11 TESTS 39 218 0
154618305 kkz666 D April 23, 2022, 5:17 a.m. OK Java 11 TESTS 39 218 0
154617924 kartikpapney D April 23, 2022, 5:12 a.m. OK Java 11 TESTS 39 218 0
154614588 __Serendipity D April 23, 2022, 4:11 a.m. OK Java 11 TESTS 39 218 0
154598274 codingIsFun1234 D April 22, 2022, 9:06 p.m. OK Java 11 TESTS 39 218 0
154842005 spiderwebs D April 24, 2022, 11:19 a.m. OK Java 8 TESTS 39 109 0
154823482 Sachin_2961 D April 24, 2022, 7:54 a.m. OK Java 8 TESTS 39 124 0
154623949 ND_ D April 23, 2022, 6:27 a.m. OK Java 8 TESTS 39 124 0
154616008 Swapniltri D April 23, 2022, 4:40 a.m. OK Java 8 TESTS 39 124 1945600
154603768 ziduoyi D April 22, 2022, 11:27 p.m. OK Java 8 TESTS 39 140 2048000
154686968 invincible777 D April 23, 2022, 1:23 p.m. OK Java 8 TESTS 39 155 2355200
154897972 leonlian D April 25, 2022, 2:29 a.m. OK Java 8 TESTS 39 155 2662400
154589490 MagentaCobra D April 22, 2022, 6:50 p.m. OK Java 8 TESTS 39 186 2867200
154675914 sauravmandal D April 23, 2022, 1:03 p.m. OK Java 8 TESTS 39 187 2867200
154595289 pranayrana14 D April 22, 2022, 8:20 p.m. OK Java 8 TESTS 39 202 2048000
154868067 linxiaotian D April 24, 2022, 3:30 p.m. OK Kotlin 1.4 TESTS 39 202 15872000
154869862 linxiaotian D April 24, 2022, 3:47 p.m. OK Kotlin 1.4 TESTS 39 217 10547200
154874805 deyilhou D April 24, 2022, 4:39 p.m. OK MS C++ 2017 TESTS 39 62 1638400
154653981 lethanhminh0801 D April 23, 2022, 12:06 p.m. OK MS C++ 2017 TESTS 39 218 1638400
154652103 Kanata369 D April 23, 2022, 11:45 a.m. OK MS C++ 2017 TESTS 39 218 2457600
154643089 SmilingBraniac D April 23, 2022, 10:04 a.m. OK MS C++ 2017 TESTS 39 233 0
154590570 setsuna_suki D April 22, 2022, 7:07 p.m. OK MS C++ 2017 TESTS 39 233 819200
154655212 A_Pier D April 23, 2022, 12:22 p.m. OK MS C++ 2017 TESTS 39 233 1638400
154642527 chinesedfan D April 23, 2022, 9:57 a.m. OK Node.js TESTS 39 171 14028800
154583868 1_2_3_4_5_9 D April 22, 2022, 5:38 p.m. OK PyPy 2 TESTS 39 249 19456000
154623138 hxu10 D April 23, 2022, 6:19 a.m. OK PyPy 3 TESTS 39 218 15564800
154789377 Ayushman_123 D April 23, 2022, 8:57 p.m. OK PyPy 3 TESTS 39 436 19456000
154682073 Ace_42 D April 23, 2022, 1:14 p.m. OK PyPy 3 TESTS 39 530 16384000
154637399 tan_delhi D April 23, 2022, 9:04 a.m. OK PyPy 3 TESTS 39 592 16281600
154690762 3juhwan D April 23, 2022, 1:24 p.m. OK PyPy 3 TESTS 39 592 16691200
154622021 3juhwan D April 23, 2022, 6:07 a.m. OK PyPy 3 TESTS 39 608 16691200
154595985 Bad_day_toCode D April 22, 2022, 8:30 p.m. OK PyPy 3 TESTS 39 716 30412800
154583989 Usurper__ D April 22, 2022, 5:39 p.m. OK PyPy 3 TESTS 39 716 30412800
154646386 sakshatmali D April 23, 2022, 10:40 a.m. OK PyPy 3-64 TESTS 39 217 19968000
154713898 _Frust D April 23, 2022, 2:28 p.m. OK PyPy 3-64 TESTS 39 217 21094400
154599589 Aksnov D April 22, 2022, 9:31 p.m. OK PyPy 3-64 TESTS 39 218 22732800
154790847 notTehlka D April 23, 2022, 9:25 p.m. OK PyPy 3-64 TESTS 39 233 23347200
154617225 nitish420 D April 23, 2022, 5 a.m. OK PyPy 3-64 TESTS 39 234 23347200
154588157 sushmanth.dampur8780 D April 22, 2022, 6:31 p.m. OK PyPy 3-64 TESTS 39 295 24985600
154818301 nicku123 D April 24, 2022, 6:59 a.m. OK PyPy 3-64 TESTS 39 311 25088000
154647576 Heatz D April 23, 2022, 10:54 a.m. OK PyPy 3-64 TESTS 39 327 31436800
154878792 majay1638 D April 24, 2022, 5:40 p.m. OK PyPy 3-64 TESTS 39 343 25804800
154592779 unknownSolver D April 22, 2022, 7:41 p.m. OK PyPy 3-64 TESTS 39 358 25190400
154786951 abcsumit D April 23, 2022, 8:16 p.m. OK Python 3 TESTS 39 295 13926400
154906395 wenqi D April 25, 2022, 5:36 a.m. OK Python 3 TESTS 39 358 13926400
154647095 jamesbansal24jan D April 23, 2022, 10:48 a.m. OK Python 3 TESTS 39 405 13926400
154647738 jamesbansal24jan D April 23, 2022, 10:56 a.m. OK Python 3 TESTS 39 420 14233600
154625288 toomer D April 23, 2022, 6:42 a.m. OK Rust 2021 TESTS 39 31 9625600

remove filters

Back to search problems