Codeforces Round 845 (Div. 2) and ByteRace 2023

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
1777 Codeforces Round 845 (Div. 2) and ByteRace 2023 FINISHED False 7200 57511499 Jan. 21, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 25085 ) A Everybody Likes Good Arrays! PROGRAMMING greedy math

B'An array a is good if for all pairs of adjacent elements, a_i and a_{i+1} ( 1 <= i lt n ) are of different parity. Note that an array of size 1 is trivially good. You are given an array of size n . In one operation you can select any pair of adjacent elements in which both elements are of the same parity, delete them, and insert their product in the same position. Find the minimum number of operations to form a good array. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 500 ). The description of the test cases follows. The first line of each test case contains an integer n ( 1 <= n <= 100 ). The second line of each test case contains n integers a_1,a_2, ldots,a_n ( 1 <= a_i <= 10^{9} ). For each test case print an integer, the minimum number of operations required to form a good array. Consider the first test case. Select the 2 -nd and the 3 -rd integers and apply the operation on them. The array changes from [1, color{red}{7}, color{red}{11}, 2, 13] to [1, color{red}{77}, 2, 13] . Next, select the 1 -st and the 2 -nd integers, array changes from [ color{red}{1}, color{red}{77}, 2, 13] to [ color{red}{77}, 2, 13] . Thus we require 2 operations. It can be proved that this is the minimum number of operations. In the second test case, the given array is already good. So we require 0 operations. '...

Tutorials

Codeforces Round #845 (Div. 2) and ByteRace 2023 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
190014173 Wheda A Jan. 21, 2023, 3:59 p.m. OK C# 10 TESTS 13 46 3174400
190036162 Mohamed_Achraf A Jan. 21, 2023, 7:01 p.m. OK Clang++17 Diagnostics TESTS 13 140 0
190039904 Mohamed_Achraf A Jan. 21, 2023, 7:43 p.m. OK Clang++17 Diagnostics TESTS 13 171 0
190038711 pratyushraghuvanshi73 A Jan. 21, 2023, 7:28 p.m. OK Clang++17 Diagnostics TESTS 13 187 0
190055507 five_v_five A Jan. 22, 2023, 3:21 a.m. OK Clang++20 Diagnostics TESTS 13 171 0
190042230 Srishti__777 A Jan. 21, 2023, 8:19 p.m. OK Clang++20 Diagnostics TESTS 13 171 0
190046004 Ansh_Shah_ A Jan. 21, 2023, 9:32 p.m. OK GNU C11 TESTS 13 15 0
190053786 Smallorange A Jan. 22, 2023, 2:21 a.m. OK GNU C11 TESTS 13 15 0
190023453 2210030294 A Jan. 21, 2023, 4:30 p.m. OK GNU C11 TESTS 13 15 0
190023674 2210030063_saikiran. A Jan. 21, 2023, 4:30 p.m. OK GNU C11 TESTS 13 15 0
190023711 aniket27gupta03 A Jan. 21, 2023, 4:31 p.m. OK GNU C11 TESTS 13 15 0
190034494 _M7s3c7 A Jan. 21, 2023, 6:49 p.m. OK GNU C11 TESTS 13 15 0
190036087 Umnikfan A Jan. 21, 2023, 7 p.m. OK GNU C11 TESTS 13 15 0
190036158 wackyIndian A Jan. 21, 2023, 7:01 p.m. OK GNU C11 TESTS 13 15 0
190038247 tatanos A Jan. 21, 2023, 7:23 p.m. OK GNU C11 TESTS 13 15 0
190040422 lancelot_71 A Jan. 21, 2023, 7:51 p.m. OK GNU C11 TESTS 13 15 0
190052360 maisui A Jan. 22, 2023, 1:30 a.m. OK GNU C++14 TESTS 13 0 0
190035205 singhabhishek6 A Jan. 21, 2023, 6:53 p.m. OK GNU C++14 TESTS 13 0 102400
190052704 _bhavik3103 A Jan. 22, 2023, 1:43 a.m. OK GNU C++14 TESTS 13 0 204800
190056650 zrjtcf A Jan. 22, 2023, 3:55 a.m. OK GNU C++14 TESTS 13 0 1638400
190060109 1919810114514 A Jan. 22, 2023, 5:08 a.m. OK GNU C++14 TESTS 13 15 0
190060961 chandler1837 A Jan. 22, 2023, 5:21 a.m. OK GNU C++14 TESTS 13 15 0
190061059 7star86 A Jan. 22, 2023, 5:23 a.m. OK GNU C++14 TESTS 13 15 0
190062811 s_a_jha A Jan. 22, 2023, 5:47 a.m. OK GNU C++14 TESTS 13 15 0
190063933 Babbar_606 A Jan. 22, 2023, 6:01 a.m. OK GNU C++14 TESTS 13 15 0
190058593 Pious A Jan. 22, 2023, 4:41 a.m. OK GNU C++14 TESTS 13 15 0
190047098 MEGAMMS A Jan. 21, 2023, 9:58 p.m. OK GNU C++17 TESTS 13 0 0
190048887 MarwaMubarak A Jan. 21, 2023, 10:58 p.m. OK GNU C++17 TESTS 13 0 0
190041269 Nothin123 A Jan. 21, 2023, 8:02 p.m. OK GNU C++17 TESTS 13 0 0
190035590 _Bond_007_ A Jan. 21, 2023, 6:56 p.m. OK GNU C++17 TESTS 13 0 0
190042679 Ayush_0016 A Jan. 21, 2023, 8:26 p.m. OK GNU C++17 TESTS 13 0 0
190018424 BugDancer A Jan. 21, 2023, 4:13 p.m. OK GNU C++17 TESTS 13 0 102400
190055752 looper2002 A Jan. 22, 2023, 3:27 a.m. OK GNU C++17 TESTS 13 0 102400
190050889 C0DET1GER A Jan. 22, 2023, 12:28 a.m. OK GNU C++17 TESTS 13 0 102400
190057337 _numeroUno A Jan. 22, 2023, 4:14 a.m. OK GNU C++17 TESTS 13 0 102400
190062108 LUFFY_02 A Jan. 22, 2023, 5:38 a.m. OK GNU C++17 TESTS 13 0 102400
190056620 vasubeladiya A Jan. 22, 2023, 3:54 a.m. OK GNU C++17 (64) TESTS 13 0 0
190058019 cosinechicken A Jan. 22, 2023, 4:31 a.m. OK GNU C++17 (64) TESTS 13 0 204800
190055135 Oinng A Jan. 22, 2023, 3:11 a.m. OK GNU C++17 (64) TESTS 13 15 0
190055640 Maburb A Jan. 22, 2023, 3:25 a.m. OK GNU C++17 (64) TESTS 13 15 0
190054041 sanjay_appari A Jan. 22, 2023, 2:31 a.m. OK GNU C++17 (64) TESTS 13 15 0
190054020 joshna_30 A Jan. 22, 2023, 2:30 a.m. OK GNU C++17 (64) TESTS 13 15 0
190050471 Huntik_03 A Jan. 22, 2023, 12:11 a.m. OK GNU C++17 (64) TESTS 13 15 0
190048068 enslaved A Jan. 21, 2023, 10:28 p.m. OK GNU C++17 (64) TESTS 13 15 0
190063592 Frodoo A Jan. 22, 2023, 5:58 a.m. OK GNU C++17 (64) TESTS 13 15 0
190062508 NITYAM_BHUSHAN A Jan. 22, 2023, 5:43 a.m. OK GNU C++17 (64) TESTS 13 15 0
190047042 pixy4410 A Jan. 21, 2023, 9:57 p.m. OK GNU C++20 (64) TESTS 13 0 0
190062816 shiv99265 A Jan. 22, 2023, 5:47 a.m. OK GNU C++20 (64) TESTS 13 0 0
190060272 yunowe A Jan. 22, 2023, 5:10 a.m. OK GNU C++20 (64) TESTS 13 0 0
190058838 Shiva___ A Jan. 22, 2023, 4:46 a.m. OK GNU C++20 (64) TESTS 13 0 0
190056661 guet_astronaut A Jan. 22, 2023, 3:55 a.m. OK GNU C++20 (64) TESTS 13 0 0
190056106 bigJ A Jan. 22, 2023, 3:38 a.m. OK GNU C++20 (64) TESTS 13 0 0
190055284 tedi_2.0 A Jan. 22, 2023, 3:15 a.m. OK GNU C++20 (64) TESTS 13 0 0
190053363 Zeoy A Jan. 22, 2023, 2:04 a.m. OK GNU C++20 (64) TESTS 13 0 0
190051325 dragoonfx A Jan. 22, 2023, 12:42 a.m. OK GNU C++20 (64) TESTS 13 0 0
190050613 yingluosanqian A Jan. 22, 2023, 12:17 a.m. OK GNU C++20 (64) TESTS 13 0 0
190038507 markmoretto A Jan. 21, 2023, 7:26 p.m. OK Go TESTS 13 31 819200
190051291 surya03 A Jan. 22, 2023, 12:41 a.m. OK Java 11 TESTS 13 170 0
190057907 gk_cool A Jan. 22, 2023, 4:28 a.m. OK Java 11 TESTS 13 171 0
190057854 jassim_17 A Jan. 22, 2023, 4:27 a.m. OK Java 11 TESTS 13 218 0
190054665 archieagarwal A Jan. 22, 2023, 2:58 a.m. OK Java 11 TESTS 13 218 0
190059224 yogesg_25 A Jan. 22, 2023, 4:53 a.m. OK Java 11 TESTS 13 233 0
190046991 sahityatripathi1 A Jan. 21, 2023, 9:55 p.m. OK Java 11 TESTS 13 233 0
190018325 amanS A Jan. 21, 2023, 4:13 p.m. OK Java 11 TESTS 13 234 0
190016021 testing_arnav A Jan. 21, 2023, 4:05 p.m. OK Java 11 TESTS 13 248 0
190060548 viper01 A Jan. 22, 2023, 5:15 a.m. OK Java 11 TESTS 13 249 0
190012274 smitpadshala99 A Jan. 21, 2023, 3:53 p.m. OK Java 11 TESTS 13 249 0
190035441 harshbhandariv A Jan. 21, 2023, 6:55 p.m. OK Java 17 TESTS 13 155 307200
190052054 ahmedtawfik A Jan. 22, 2023, 1:14 a.m. OK Java 17 TESTS 13 171 409600
190016887 JaaackSparoow A Jan. 21, 2023, 4:08 p.m. OK Java 17 TESTS 13 186 0
190034979 not_just_rr A Jan. 21, 2023, 6:51 p.m. OK Java 17 TESTS 13 187 409600
190036214 Mustela_Erminea A Jan. 21, 2023, 7:01 p.m. OK Java 17 TESTS 13 202 512000
190018232 shubhanshu_jha14 A Jan. 21, 2023, 4:13 p.m. OK Java 17 TESTS 13 202 819200
190035969 Danger_Don A Jan. 21, 2023, 6:59 p.m. OK Java 17 TESTS 13 233 0
190018749 priyankasinghhhhh A Jan. 21, 2023, 4:15 p.m. OK Java 17 TESTS 13 233 0
190021337 teraBhaiThugesh A Jan. 21, 2023, 4:23 p.m. OK Java 17 TESTS 13 233 512000
190041480 Error__1259 A Jan. 21, 2023, 8:05 p.m. OK Java 17 TESTS 13 234 921600
190022462 Saeed_AlKtifani A Jan. 21, 2023, 4:27 p.m. OK Java 8 TESTS 13 93 0
190038708 Koka A Jan. 21, 2023, 7:28 p.m. OK Java 8 TESTS 13 93 0
190036923 MrTHRASHER A Jan. 21, 2023, 7:09 p.m. OK Java 8 TESTS 13 93 0
190038240 DylanSmith A Jan. 21, 2023, 7:23 p.m. OK Java 8 TESTS 13 108 0
190035622 dode_pep A Jan. 21, 2023, 6:56 p.m. OK Java 8 TESTS 13 108 0
190035421 dode_pep A Jan. 21, 2023, 6:54 p.m. OK Java 8 TESTS 13 108 0
190061717 depurador_ik A Jan. 22, 2023, 5:32 a.m. OK Java 8 TESTS 13 109 0
190021797 DStavi A Jan. 21, 2023, 4:25 p.m. OK Java 8 TESTS 13 124 0
190020264 tripathi11ananya A Jan. 21, 2023, 4:20 p.m. OK Java 8 TESTS 13 156 0
190053687 hrishita31 A Jan. 22, 2023, 2:17 a.m. OK Java 8 TESTS 13 171 0
190021272 Yash_Bansal A Jan. 21, 2023, 4:23 p.m. OK JavaScript TESTS 13 30 1228800
190061053 KarkiAayush01 A Jan. 22, 2023, 5:23 a.m. OK MS C++ 2017 TESTS 13 31 0
190046194 Spartan3002 A Jan. 21, 2023, 9:37 p.m. OK MS C++ 2017 TESTS 13 31 0
190034853 153floppa A Jan. 21, 2023, 6:51 p.m. OK MS C++ 2017 TESTS 13 31 0
190015555 IgorDO A Jan. 21, 2023, 4:04 p.m. OK MS C++ 2017 TESTS 13 31 0
190019045 qmqmqqm A Jan. 21, 2023, 4:16 p.m. OK MS C++ 2017 TESTS 13 46 0
190024143 WEYST A Jan. 21, 2023, 4:32 p.m. OK PascalABC.NET TESTS 13 170 1126400
190049109 rsFalse A Jan. 21, 2023, 11:08 p.m. OK Perl TESTS 13 31 0
190059039 codin.vaishnav A Jan. 22, 2023, 4:49 a.m. OK PHP TESTS 13 31 0
190056579 hkwu6013 A Jan. 22, 2023, 3:52 a.m. OK PyPy 3 TESTS 13 93 2150400
190051123 Track-Days A Jan. 22, 2023, 12:36 a.m. OK PyPy 3 TESTS 13 93 2969600
190055954 piico A Jan. 22, 2023, 3:33 a.m. OK PyPy 3 TESTS 13 108 3174400
190036267 duck_man123 A Jan. 21, 2023, 7:02 p.m. OK PyPy 3 TESTS 13 140 5836800
190012916 markivanantha A Jan. 21, 2023, 3:55 p.m. OK PyPy 3 TESTS 13 155 5836800
190022774 Recurser A Jan. 21, 2023, 4:28 p.m. OK PyPy 3 TESTS 13 155 6144000
190043391 LazyRGuy A Jan. 21, 2023, 8:39 p.m. OK PyPy 3 TESTS 13 171 5939200
190058276 yash7890 A Jan. 22, 2023, 4:36 a.m. OK PyPy 3 TESTS 13 186 5529600
190036252 rmr A Jan. 21, 2023, 7:02 p.m. OK PyPy 3-64 TESTS 13 61 1843200
190035349 sushmanth.dampur8780 A Jan. 21, 2023, 6:54 p.m. OK PyPy 3-64 TESTS 13 61 1843200
190038947 Triump_0112 A Jan. 21, 2023, 7:31 p.m. OK PyPy 3-64 TESTS 13 61 2252800
190034175 gardengnome A Jan. 21, 2023, 6:47 p.m. OK PyPy 3-64 TESTS 13 62 2252800
190057085 rishabh26072003 A Jan. 22, 2023, 4:07 a.m. OK PyPy 3-64 TESTS 13 62 2969600
190012889 agw02010 A Jan. 21, 2023, 3:55 p.m. OK PyPy 3-64 TESTS 13 62 2969600
190055622 Youarenotgood A Jan. 22, 2023, 3:24 a.m. OK PyPy 3-64 TESTS 13 62 3072000
190056271 MenaceJn A Jan. 22, 2023, 3:43 a.m. OK PyPy 3-64 TESTS 13 77 2764800
190054250 adithya1207 A Jan. 22, 2023, 2:41 a.m. OK PyPy 3-64 TESTS 13 78 2867200
190022581 xordan.- A Jan. 21, 2023, 4:27 p.m. OK PyPy 3-64 TESTS 13 93 4300800
190058996 khan_ali A Jan. 22, 2023, 4:48 a.m. OK Python 3 TESTS 13 46 0
190053822 pidiawara56 A Jan. 22, 2023, 2:22 a.m. OK Python 3 TESTS 13 46 0
190034803 rudrashah A Jan. 21, 2023, 6:50 p.m. OK Python 3 TESTS 13 46 0
190020987 2010030372 A Jan. 21, 2023, 4:22 p.m. OK Python 3 TESTS 13 46 0
190020896 tamimbro A Jan. 21, 2023, 4:22 p.m. OK Python 3 TESTS 13 46 0
190018601 meta_artem A Jan. 21, 2023, 4:14 p.m. OK Python 3 TESTS 13 46 0
190018085 mohammedahme1212 A Jan. 21, 2023, 4:12 p.m. OK Python 3 TESTS 13 46 0
190017488 pavanRamagiri A Jan. 21, 2023, 4:10 p.m. OK Python 3 TESTS 13 46 0
190016000 Nurbibi A Jan. 21, 2023, 4:05 p.m. OK Python 3 TESTS 13 46 0
190014641 ruvxei A Jan. 21, 2023, 4 p.m. OK Python 3 TESTS 13 46 0
190047720 liut A Jan. 21, 2023, 10:17 p.m. OK Rust 2021 TESTS 13 15 0
190046137 dmenezes A Jan. 21, 2023, 9:35 p.m. OK Rust 2021 TESTS 13 15 102400

remove filters

Back to search problems