Educational Codeforces Round 158 (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
1901 Educational Codeforces Round 158 (Rated for Div. 2) FINISHED False 7200 30986699 Nov. 24, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15118 ) B Chip and Ribbon PROGRAMMING greedy math

B"There is a ribbon divided into n cells, numbered from 1 to n from left to right. Initially, an integer 0 is written in each cell. Monocarp plays a game with a chip. The game consists of several turns. During the first turn, Monocarp places the chip in the 1 -st cell of the ribbon. During each turn except for the first turn, Monocarp does exactly one of the two following actions: At the end of each turn, the integer written in the cell with the chip is increased by 1 . Monocarp's goal is to make some turns so that the 1 -st cell contains the integer c_1 , the 2 -nd cell contains the integer c_2 , ..., the n -th cell contains the integer c_n . He wants to teleport the chip as few times as possible. Help Monocarp calculate the minimum number of times he has to teleport the chip. The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Each test case consists of two lines: It can be shown that under these constraints, it is always possible to make a finite amount of turns so that the integers in the cells match the sequence c_1, c_2, ... , c_n . Additional constraint on the input: the sum of values of n over all test cases does not exceed 2 cdot 10^5 . For each test case, print one integer -- the minimum number of times Monocarp has to teleport the chip. In the first test case of the example, Monocarp can perform the turns as follows: "...

Tutorials

Educational Codeforces Round 158 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
234150592 ungerfall B Nov. 24, 2023, 8:59 p.m. OK C# 10 TESTS 4 92 16998400
234121471 KasodaniKyouko B Nov. 24, 2023, 4:51 p.m. OK C# 10 TESTS 4 109 16896000
234167494 sh_arman B Nov. 25, 2023, 3:05 a.m. OK C# 10 TESTS 4 124 16384000
234160280 bluemegane B Nov. 25, 2023, 12:33 a.m. OK C# 8 TESTS 4 124 17510400
234177886 xiaopenyou123 B Nov. 25, 2023, 5:23 a.m. OK Clang++17 Diagnostics TESTS 4 982 1024000
234177275 a12355151 B Nov. 25, 2023, 5:17 a.m. OK Clang++20 Diagnostics TESTS 4 904 8396800
234150860 Gassa B Nov. 24, 2023, 9:02 p.m. OK D TESTS 4 62 9625600
234150957 Gassa B Nov. 24, 2023, 9:03 p.m. OK D TESTS 4 77 6348800
234135011 NenadDapic B Nov. 24, 2023, 6:20 p.m. OK FPC TESTS 4 46 921600
234134027 Tarek00t B Nov. 24, 2023, 6:13 p.m. OK GNU C11 TESTS 4 61 819200
234180962 Uno_Master B Nov. 25, 2023, 5:52 a.m. OK GNU C11 TESTS 4 62 0
234119405 Unk1ndled B Nov. 24, 2023, 4:41 p.m. OK GNU C11 TESTS 4 62 0
234121727 c0derro B Nov. 24, 2023, 4:52 p.m. OK GNU C11 TESTS 4 62 307200
234132067 kingAB B Nov. 24, 2023, 5:59 p.m. OK GNU C11 TESTS 4 62 1024000
234119226 Unk1ndled B Nov. 24, 2023, 4:41 p.m. OK GNU C11 TESTS 4 78 0
234170280 _Disguiser_ B Nov. 25, 2023, 3:52 a.m. OK GNU C++14 TESTS 4 15 5324800
234118410 keffsteve B Nov. 24, 2023, 4:38 p.m. OK GNU C++14 TESTS 4 30 0
234120875 bjbs B Nov. 24, 2023, 4:48 p.m. OK GNU C++14 TESTS 4 30 409600
234121892 bjbs B Nov. 24, 2023, 4:53 p.m. OK GNU C++14 TESTS 4 30 409600
234172206 Jones_K B Nov. 25, 2023, 4:20 a.m. OK GNU C++14 TESTS 4 31 716800
234174688 kinorw B Nov. 25, 2023, 4:51 a.m. OK GNU C++14 TESTS 4 46 0
234158446 You__Know__Who__ B Nov. 24, 2023, 11:37 p.m. OK GNU C++14 TESTS 4 46 0
234122385 sherlock8696 B Nov. 24, 2023, 4:56 p.m. OK GNU C++14 TESTS 4 46 409600
234154727 omeganot B Nov. 24, 2023, 10:06 p.m. OK GNU C++14 TESTS 4 46 409600
234175094 lonelyness B Nov. 25, 2023, 4:56 a.m. OK GNU C++14 TESTS 4 46 716800
234121847 AcKing_Messywind B Nov. 24, 2023, 4:53 p.m. OK GNU C++17 TESTS 4 30 1228800
234112119 Dissolved B Nov. 24, 2023, 4:25 p.m. OK GNU C++17 TESTS 4 31 307200
234163578 3321lqw B Nov. 25, 2023, 1:52 a.m. OK GNU C++17 TESTS 4 31 409600
234120349 PoloniumLuke B Nov. 24, 2023, 4:46 p.m. OK GNU C++17 TESTS 4 31 1126400
234155003 Pixelz123 B Nov. 24, 2023, 10:11 p.m. OK GNU C++17 TESTS 4 46 0
234165857 karamkontar B Nov. 25, 2023, 2:35 a.m. OK GNU C++17 TESTS 4 46 0
234168392 fraco_oxza B Nov. 25, 2023, 3:21 a.m. OK GNU C++17 TESTS 4 46 0
234163817 fraco_oxza B Nov. 25, 2023, 1:56 a.m. OK GNU C++17 TESTS 4 46 0
234121100 Abdul_Aziz B Nov. 24, 2023, 4:49 p.m. OK GNU C++17 TESTS 4 46 0
234120505 icchou233 B Nov. 24, 2023, 4:47 p.m. OK GNU C++17 TESTS 4 46 0
234120198 Roaa_Abdelwhab B Nov. 24, 2023, 4:45 p.m. OK GNU C++17 (64) TESTS 4 30 716800
234161881 XuMoheng B Nov. 25, 2023, 1:14 a.m. OK GNU C++17 (64) TESTS 4 30 1638400
234169099 ShantanuBhojak B Nov. 25, 2023, 3:33 a.m. OK GNU C++17 (64) TESTS 4 30 2150400
234125715 _Visitor B Nov. 24, 2023, 5:14 p.m. OK GNU C++17 (64) TESTS 4 31 0
234159168 Sempr B Nov. 25, 2023, midnight OK GNU C++17 (64) TESTS 4 31 102400
234177088 MH_Nazmul B Nov. 25, 2023, 5:16 a.m. OK GNU C++17 (64) TESTS 4 31 409600
234167598 enslaved B Nov. 25, 2023, 3:07 a.m. OK GNU C++17 (64) TESTS 4 31 409600
234160857 md_jakir B Nov. 25, 2023, 12:49 a.m. OK GNU C++17 (64) TESTS 4 31 409600
234119614 ASLEH B Nov. 24, 2023, 4:43 p.m. OK GNU C++17 (64) TESTS 4 31 409600
234177420 urvashi_1210 B Nov. 25, 2023, 5:19 a.m. OK GNU C++17 (64) TESTS 4 31 716800
234172255 HimotoLmao B Nov. 25, 2023, 4:21 a.m. OK GNU C++20 (64) TESTS 4 15 0
234164887 DKAZ B Nov. 25, 2023, 2:17 a.m. OK GNU C++20 (64) TESTS 4 15 0
234148702 thewoahguy24 B Nov. 24, 2023, 8:33 p.m. OK GNU C++20 (64) TESTS 4 15 0
234126395 ryuga01 B Nov. 24, 2023, 5:19 p.m. OK GNU C++20 (64) TESTS 4 15 0
234123244 leeyiheng12 B Nov. 24, 2023, 5:01 p.m. OK GNU C++20 (64) TESTS 4 15 0
234180837 Ahmed0.Elazab B Nov. 25, 2023, 5:51 a.m. OK GNU C++20 (64) TESTS 4 15 307200
234161257 pkp245464 B Nov. 25, 2023, 12:58 a.m. OK GNU C++20 (64) TESTS 4 15 409600
234175693 IcasusII B Nov. 25, 2023, 5:02 a.m. OK GNU C++20 (64) TESTS 4 15 409600
234177946 yskm B Nov. 25, 2023, 5:24 a.m. OK GNU C++20 (64) TESTS 4 15 716800
234180819 akcube B Nov. 25, 2023, 5:51 a.m. OK GNU C++20 (64) TESTS 4 15 716800
234164036 lxy_sheep B Nov. 25, 2023, 2:01 a.m. OK Go TESTS 4 93 4812800
234112504 RahulAhuja2901 B Nov. 24, 2023, 4:26 p.m. OK Java 11 TESTS 4 186 0
234125138 Pranav_Sharda B Nov. 24, 2023, 5:11 p.m. OK Java 11 TESTS 4 202 0
234180493 rajatgupta05 B Nov. 25, 2023, 5:48 a.m. OK Java 11 TESTS 4 218 0
234110952 _.aadi01 B Nov. 24, 2023, 4:23 p.m. OK Java 11 TESTS 4 233 40448000
234130261 insyncure B Nov. 24, 2023, 5:46 p.m. OK Java 11 TESTS 4 234 0
234179503 emperor_r B Nov. 25, 2023, 5:40 a.m. OK Java 11 TESTS 4 249 0
234110531 ljjkr B Nov. 24, 2023, 4:22 p.m. OK Java 11 TESTS 4 264 3072000
234165596 wise_flying_pigs B Nov. 25, 2023, 2:30 a.m. OK Java 11 TESTS 4 296 3686400
234131415 AdeelFeroz B Nov. 24, 2023, 5:54 p.m. OK Java 11 TESTS 4 420 0
234172139 Shenta B Nov. 25, 2023, 4:19 a.m. OK Java 11 TESTS 4 420 0
234128918 CutSandstone B Nov. 24, 2023, 5:36 p.m. OK Java 17 TESTS 4 170 4608000
234126586 puriabhijit000 B Nov. 24, 2023, 5:20 p.m. OK Java 17 TESTS 4 186 921600
234124244 shashankp10 B Nov. 24, 2023, 5:06 p.m. OK Java 17 TESTS 4 218 409600
234118127 yogesg_25 B Nov. 24, 2023, 4:37 p.m. OK Java 17 TESTS 4 218 512000
234144727 anand_mishra_ B Nov. 24, 2023, 7:48 p.m. OK Java 17 TESTS 4 248 512000
234142402 aishwarykesarwani B Nov. 24, 2023, 7:24 p.m. OK Java 17 TESTS 4 249 409600
234116051 yogesg_25 B Nov. 24, 2023, 4:32 p.m. OK Java 17 TESTS 4 311 307200
234118522 Ashuraj_Herode B Nov. 24, 2023, 4:38 p.m. OK Java 17 TESTS 4 421 409600
234178953 wdjuruo B Nov. 25, 2023, 5:33 a.m. OK Java 17 TESTS 4 436 512000
234114410 jayant24sha B Nov. 24, 2023, 4:30 p.m. OK Java 17 TESTS 4 436 819200
234163324 frey4 B Nov. 25, 2023, 1:46 a.m. OK Java 21 TESTS 4 248 0
234179218 darshanjan-entrepreneur B Nov. 25, 2023, 5:37 a.m. OK Java 21 TESTS 4 280 307200
234147710 ollieys B Nov. 24, 2023, 8:22 p.m. OK Java 21 TESTS 4 311 0
234136605 Akash_Sardar B Nov. 24, 2023, 6:32 p.m. OK Java 21 TESTS 4 389 3481600
234179383 amitkumarpunia02082002 B Nov. 25, 2023, 5:39 a.m. OK Java 21 TESTS 4 514 716800
234124486 sulthanso73 B Nov. 24, 2023, 5:07 p.m. OK Java 21 TESTS 4 561 716800
234124061 priyanshuwu B Nov. 24, 2023, 5:05 p.m. OK Java 21 TESTS 4 608 614400
234155907 Kenzhezhan B Nov. 24, 2023, 10:29 p.m. OK Java 8 TESTS 4 109 0
234174198 arpit31 B Nov. 25, 2023, 4:46 a.m. OK Java 8 TESTS 4 124 0
234171554 860421 B Nov. 25, 2023, 4:11 a.m. OK Java 8 TESTS 4 124 0
234161521 mohamedhassan_c B Nov. 25, 2023, 1:05 a.m. OK Java 8 TESTS 4 124 8396800
234132429 formidablechief_27 B Nov. 24, 2023, 6:02 p.m. OK Java 8 TESTS 4 140 3481600
234134108 NobaraKugasaki B Nov. 24, 2023, 6:14 p.m. OK Java 8 TESTS 4 155 0
234120262 rajr86642 B Nov. 24, 2023, 4:46 p.m. OK Java 8 TESTS 4 171 0
234111122 vaibhavgawad B Nov. 24, 2023, 4:23 p.m. OK Java 8 TESTS 4 171 0
234120720 jitu7033 B Nov. 24, 2023, 4:48 p.m. OK Java 8 TESTS 4 186 0
234137510 Sumitsingh7 B Nov. 24, 2023, 6:40 p.m. OK Java 8 TESTS 4 202 6041600
234115749 baloomba B Nov. 24, 2023, 4:32 p.m. OK MS C++ 2017 TESTS 4 171 1843200
234114362 isnot B Nov. 24, 2023, 4:30 p.m. OK MS C++ 2017 TESTS 4 186 1638400
234123852 Ze4o_0 B Nov. 24, 2023, 5:04 p.m. OK MS C++ 2017 TESTS 4 202 0
234170064 alone_gifted B Nov. 25, 2023, 3:48 a.m. OK MS C++ 2017 TESTS 4 202 716800
234178157 juchengyu B Nov. 25, 2023, 5:26 a.m. OK MS C++ 2017 TESTS 4 202 819200
234113308 tytsmile B Nov. 24, 2023, 4:28 p.m. OK MS C++ 2017 TESTS 4 202 819200
234134107 Swayam78 B Nov. 24, 2023, 6:14 p.m. OK MS C++ 2017 TESTS 4 202 1228800
234129225 ErikUsmanov B Nov. 24, 2023, 5:38 p.m. OK PyPy 3 TESTS 4 311 12800000
234161496 kaiicheng B Nov. 25, 2023, 1:04 a.m. OK PyPy 3 TESTS 4 327 12697600
234142591 emrakul B Nov. 24, 2023, 7:26 p.m. OK PyPy 3 TESTS 4 327 13107200
234175917 AnirudhBharatiya B Nov. 25, 2023, 5:04 a.m. OK PyPy 3 TESTS 4 343 12595200
234175044 AnirudhBharatiya B Nov. 25, 2023, 4:55 a.m. OK PyPy 3 TESTS 4 343 12697600
234127464 AnirudhBharatiya B Nov. 24, 2023, 5:26 p.m. OK PyPy 3 TESTS 4 358 13004800
234132785 eanvarov09 B Nov. 24, 2023, 6:04 p.m. OK PyPy 3 TESTS 4 373 12595200
234130396 maynk2004 B Nov. 24, 2023, 5:47 p.m. OK PyPy 3 TESTS 4 373 12800000
234164861 aaronhartono28 B Nov. 25, 2023, 2:16 a.m. OK PyPy 3-64 TESTS 4 93 16281600
234164609 aaronhartono28 B Nov. 25, 2023, 2:12 a.m. OK PyPy 3-64 TESTS 4 93 16281600
234126448 DP_FORMULA B Nov. 24, 2023, 5:19 p.m. OK PyPy 3-64 TESTS 4 93 16384000
234120410 VidGa B Nov. 24, 2023, 4:46 p.m. OK PyPy 3-64 TESTS 4 93 16588800
234135713 the_last_smilodon B Nov. 24, 2023, 6:25 p.m. OK PyPy 3-64 TESTS 4 93 17100800
234118775 hkwu6013 B Nov. 24, 2023, 4:39 p.m. OK PyPy 3-64 TESTS 4 93 21606400
234123862 Phuocbua B Nov. 24, 2023, 5:04 p.m. OK PyPy 3-64 TESTS 4 93 22528000
234135519 the_last_smilodon B Nov. 24, 2023, 6:24 p.m. OK PyPy 3-64 TESTS 4 108 16691200
234120937 linhua B Nov. 24, 2023, 4:49 p.m. OK PyPy 3-64 TESTS 4 108 17305600
234170719 vedantmishra69 B Nov. 25, 2023, 3:59 a.m. OK PyPy 3-64 TESTS 4 108 26112000
234118299 CMRIT25_21R01A7309 B Nov. 24, 2023, 4:37 p.m. OK Python 3 TESTS 4 109 11264000
234111453 CMRIT25_21R01A0543 B Nov. 24, 2023, 4:24 p.m. OK Python 3 TESTS 4 109 11366400
234142942 FreZzz B Nov. 24, 2023, 7:29 p.m. OK Python 3 TESTS 4 109 14336000
234118494 upwarder1 B Nov. 24, 2023, 4:38 p.m. OK Python 3 TESTS 4 109 14336000
234112549 21r01a7313 B Nov. 24, 2023, 4:26 p.m. OK Python 3 TESTS 4 124 11264000
234152042 Nikita_Malykh B Nov. 24, 2023, 9:20 p.m. OK Python 3 TESTS 4 124 11878400
234116479 raunakgiri21 B Nov. 24, 2023, 4:33 p.m. OK Python 3 TESTS 4 124 13619200
234139377 Surajk21 B Nov. 24, 2023, 6:55 p.m. OK Python 3 TESTS 4 124 14131200
234116932 Zappricious B Nov. 24, 2023, 4:34 p.m. OK Python 3 TESTS 4 124 14131200
234118515 harshitharuttala B Nov. 24, 2023, 4:38 p.m. OK Python 3 TESTS 4 124 14233600
234123239 matheusdacach B Nov. 24, 2023, 5 p.m. OK Rust 2021 TESTS 4 15 716800
234140618 _a253 B Nov. 24, 2023, 7:06 p.m. OK Rust 2021 TESTS 4 62 9625600

remove filters

Back to search problems