Codeforces Round 920 (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
1921 Codeforces Round 920 (Div. 3) FINISHED False 8100 26493899 Jan. 15, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 33943 ) B Arranging Cats PROGRAMMING greedy implementation

B"In order to test the hypothesis about the cats, the scientists must arrange the cats in the boxes in a specific way. Of course, they would like to test the hypothesis and publish a sensational article as quickly as possible, because they are too engrossed in the next hypothesis about the phone's battery charge. Scientists have n boxes in which cats may or may not sit. Let the current state of the boxes be denoted by the sequence b_1, ... , b_n : b_i = 1 if there is a cat in box number i , and b_i = 0 otherwise. Fortunately, the unlimited production of cats has already been established, so in one day, the scientists can perform one of the following operations: It has also been found that some boxes were immediately filled with cats. Therefore, the scientists know the initial position of the cats in the boxes s_1, ... , s_n and the desired position f_1, ... , f_n . Due to the large amount of paperwork, the scientists do not have time to solve this problem. Help them for the sake of science and indicate the minimum number of days required to test the hypothesis. Each test consists of several test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. This is followed by descriptions of the test cases. Each test case consists of three lines. The first line of each test case contains a single integer n ( 1 <= n <= 10^5 ) -- the number of boxes. The second line of each test case contains a string s of n characters, where the i -th character is '1' if there is a cat in the i -th box and '0' otherwise. The third line of each test case contains a string f of n characters, where the i -th character is '1' if there should be a cat in the i -th box and '0' otherwise. It is guaranteed that in a test the sum of n over all test cases does not exceed 10^5 . For each test case, output a single integer on a "...

Tutorials

Editorial for Codeforces Round 920 (Div. 3)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
241862577 _Ghoco_ B Jan. 15, 2024, 10:42 p.m. OK C# 10 TESTS 11 46 921600
241879385 sh_arman B Jan. 16, 2024, 4:49 a.m. OK C# 10 TESTS 11 124 716800
241865648 bluemegane B Jan. 16, 2024, 12:41 a.m. OK C# 8 TESTS 11 124 921600
241870838 aquily B Jan. 16, 2024, 2:39 a.m. OK Clang++20 Diagnostics TESTS 11 140 12595200
241880611 1RINE B Jan. 16, 2024, 5:06 a.m. OK Clang++20 Diagnostics TESTS 11 170 12595200
241852684 Yanapr B Jan. 15, 2024, 7:13 p.m. OK GNU C11 TESTS 3 31 512000
241849997 maruf_hasaN1 B Jan. 15, 2024, 6:43 p.m. OK GNU C11 TESTS 3 46 204800
241836106 HLJU_Prey B Jan. 15, 2024, 5:01 p.m. OK GNU C11 TESTS 3 46 204800
241835429 pratikjaiswal808 B Jan. 15, 2024, 4:58 p.m. OK GNU C11 TESTS 3 46 204800
241840484 pdsu.hzh B Jan. 15, 2024, 5:26 p.m. OK GNU C11 TESTS 3 46 204800
241844666 acb12345 B Jan. 15, 2024, 5:57 p.m. OK GNU C11 TESTS 3 46 307200
241849610 amanjaiswal07 B Jan. 15, 2024, 6:39 p.m. OK GNU C11 TESTS 3 46 409600
241880928 fkbzd123 B Jan. 16, 2024, 5:10 a.m. OK GNU C11 TESTS 11 46 409600
241841431 sksajjad B Jan. 15, 2024, 5:33 p.m. OK GNU C11 TESTS 3 46 409600
241845048 nipu_das B Jan. 15, 2024, 6 p.m. OK GNU C11 TESTS 3 46 409600
241835627 redfeather B Jan. 15, 2024, 4:59 p.m. OK GNU C++14 TESTS 3 0 1331200
241835644 shengtao96 B Jan. 15, 2024, 4:59 p.m. OK GNU C++14 TESTS 3 15 204800
241871655 zltzlt B Jan. 16, 2024, 2:54 a.m. OK GNU C++14 TESTS 11 15 204800
241850399 Saver2002 B Jan. 15, 2024, 6:47 p.m. OK GNU C++14 TESTS 3 15 409600
241845446 Saver2002 B Jan. 15, 2024, 6:03 p.m. OK GNU C++14 TESTS 3 15 409600
241884288 capyashraj07 B Jan. 16, 2024, 5:46 a.m. OK GNU C++14 TESTS 11 15 512000
241877574 ljyyyds5B B Jan. 16, 2024, 4:23 a.m. OK GNU C++14 TESTS 11 15 512000
241878993 i7xwn B Jan. 16, 2024, 4:44 a.m. OK GNU C++14 TESTS 11 15 512000
241885105 charmyy B Jan. 16, 2024, 5:54 a.m. OK GNU C++14 TESTS 11 15 512000
241882220 svk_99 B Jan. 16, 2024, 5:24 a.m. OK GNU C++14 TESTS 11 15 512000
241836988 debnathananta321 B Jan. 15, 2024, 5:05 p.m. OK GNU C++17 TESTS 3 0 204800
241850880 sabsus_phoneix B Jan. 15, 2024, 6:52 p.m. OK GNU C++17 TESTS 3 0 512000
241848619 pierro B Jan. 15, 2024, 6:29 p.m. OK GNU C++17 TESTS 3 0 512000
241848648 Kanishk_0012 B Jan. 15, 2024, 6:29 p.m. OK GNU C++17 TESTS 3 0 512000
241837049 Shamim_khandakar B Jan. 15, 2024, 5:06 p.m. OK GNU C++17 TESTS 3 0 512000
241837306 _fariddun_2012_ B Jan. 15, 2024, 5:07 p.m. OK GNU C++17 TESTS 3 0 512000
241838465 mariem5005 B Jan. 15, 2024, 5:13 p.m. OK GNU C++17 TESTS 3 0 512000
241842521 ZyadFva B Jan. 15, 2024, 5:41 p.m. OK GNU C++17 TESTS 3 0 512000
241842652 Harschmann B Jan. 15, 2024, 5:42 p.m. OK GNU C++17 TESTS 3 0 512000
241846241 Penguin-endl B Jan. 15, 2024, 6:09 p.m. OK GNU C++17 TESTS 3 0 512000
241852305 __TRUE__ B Jan. 15, 2024, 7:08 p.m. OK GNU C++17 (64) TESTS 3 0 409600
241859607 Rosnaky B Jan. 15, 2024, 9:14 p.m. OK GNU C++17 (64) TESTS 11 15 307200
241879554 jackylova_fan_fan_fan B Jan. 16, 2024, 4:52 a.m. OK GNU C++17 (64) TESTS 11 15 512000
241885600 shock_wav3 B Jan. 16, 2024, 6 a.m. OK GNU C++17 (64) TESTS 11 15 512000
241883239 parlimoos B Jan. 16, 2024, 5:35 a.m. OK GNU C++17 (64) TESTS 11 15 512000
241881617 KingBob B Jan. 16, 2024, 5:17 a.m. OK GNU C++17 (64) TESTS 11 15 512000
241881067 KXD04 B Jan. 16, 2024, 5:11 a.m. OK GNU C++17 (64) TESTS 11 15 512000
241880946 SzHeN B Jan. 16, 2024, 5:10 a.m. OK GNU C++17 (64) TESTS 11 15 512000
241874709 YangFan_ B Jan. 16, 2024, 3:41 a.m. OK GNU C++17 (64) TESTS 11 15 512000
241873167 xw_oo B Jan. 16, 2024, 3:16 a.m. OK GNU C++17 (64) TESTS 11 15 512000
241857032 sofiaklim B Jan. 15, 2024, 8:25 p.m. OK GNU C++20 (64) TESTS 11 0 204800
241857274 soouravdas1 B Jan. 15, 2024, 8:29 p.m. OK GNU C++20 (64) TESTS 11 0 204800
241882948 Redpo B Jan. 16, 2024, 5:32 a.m. OK GNU C++20 (64) TESTS 11 0 204800
241850709 silencer1234 B Jan. 15, 2024, 6:51 p.m. OK GNU C++20 (64) TESTS 3 0 307200
241852913 atul_k_6 B Jan. 15, 2024, 7:17 p.m. OK GNU C++20 (64) TESTS 3 0 307200
241845920 myagkov B Jan. 15, 2024, 6:06 p.m. OK GNU C++20 (64) TESTS 3 0 307200
241855252 amnchouhn B Jan. 15, 2024, 7:56 p.m. OK GNU C++20 (64) TESTS 3 0 307200
241854430 gabriel88766 B Jan. 15, 2024, 7:44 p.m. OK GNU C++20 (64) TESTS 3 0 307200
241848232 _NIS_ B Jan. 15, 2024, 6:26 p.m. OK GNU C++20 (64) TESTS 3 0 307200
241850456 happydreamer B Jan. 15, 2024, 6:48 p.m. OK GNU C++20 (64) TESTS 3 0 307200
241863033 sunaj B Jan. 15, 2024, 11:02 p.m. OK Java 11 TESTS 11 171 0
241859003 Nick B Jan. 15, 2024, 9:01 p.m. OK Java 11 TESTS 11 171 0
241855006 wat2 B Jan. 15, 2024, 7:52 p.m. OK Java 11 TESTS 3 171 0
241875295 formidablechief27 B Jan. 16, 2024, 3:49 a.m. OK Java 11 TESTS 11 217 102400
241847980 yenaya B Jan. 15, 2024, 6:23 p.m. OK Java 11 TESTS 3 233 0
241848303 AkshatSaxena_05 B Jan. 15, 2024, 6:26 p.m. OK Java 11 TESTS 3 280 102400
241857903 maariam2120 B Jan. 15, 2024, 8:40 p.m. OK Java 11 TESTS 11 295 102400
241840349 anandh_87 B Jan. 15, 2024, 5:25 p.m. OK Java 11 TESTS 3 295 102400
241839204 Ghost009 B Jan. 15, 2024, 5:18 p.m. OK Java 11 TESTS 3 295 102400
241866523 Omthegod B Jan. 16, 2024, 1:03 a.m. OK Java 11 TESTS 11 311 102400
241838336 Festyve B Jan. 15, 2024, 5:13 p.m. OK Java 17 TESTS 3 186 0
241844806 ash_79 B Jan. 15, 2024, 5:58 p.m. OK Java 17 TESTS 3 202 819200
241868380 Jatinydv17 B Jan. 16, 2024, 1:48 a.m. OK Java 17 TESTS 11 202 1024000
241865306 wuhu_ac B Jan. 16, 2024, 12:30 a.m. OK Java 17 TESTS 11 218 614400
241863729 saurabhchaubey112 B Jan. 15, 2024, 11:31 p.m. OK Java 17 TESTS 11 218 921600
241842479 sohamt-21 B Jan. 15, 2024, 5:40 p.m. OK Java 17 TESTS 3 233 102400
241877685 202152321 B Jan. 16, 2024, 4:25 a.m. OK Java 17 TESTS 11 233 921600
241850586 rachita2597 B Jan. 15, 2024, 6:49 p.m. OK Java 17 TESTS 3 249 1228800
241832423 aryansingh7910 B Jan. 15, 2024, 4:48 p.m. OK Java 17 TESTS 3 264 1126400
241881288 nit.nitish02 B Jan. 16, 2024, 5:13 a.m. OK Java 17 TESTS 11 265 512000
241834474 Pratik_M07 B Jan. 15, 2024, 4:54 p.m. OK Java 21 TESTS 3 233 0
241844504 Razdip_pal B Jan. 15, 2024, 5:55 p.m. OK Java 21 TESTS 3 249 614400
241838661 mandartule B Jan. 15, 2024, 5:14 p.m. OK Java 21 TESTS 3 264 921600
241857826 himneesh9 B Jan. 15, 2024, 8:39 p.m. OK Java 21 TESTS 11 280 1024000
241834585 Saransh_Agarwal B Jan. 15, 2024, 4:54 p.m. OK Java 21 TESTS 3 296 102400
241841026 prash23 B Jan. 15, 2024, 5:30 p.m. OK Java 21 TESTS 3 296 819200
241875396 mxny B Jan. 16, 2024, 3:50 a.m. OK Java 21 TESTS 11 311 1126400
241875251 ChongQY B Jan. 16, 2024, 3:48 a.m. OK Java 21 TESTS 11 311 25702400
241844925 krantikumar0503 B Jan. 15, 2024, 5:59 p.m. OK Java 21 TESTS 3 312 1024000
241834015 parishithada B Jan. 15, 2024, 4:52 p.m. OK Java 21 TESTS 3 358 307200
241837279 tirthgohil1410 B Jan. 15, 2024, 5:07 p.m. OK Java 8 TESTS 3 155 0
241854449 Sumitsingh7 B Jan. 15, 2024, 7:44 p.m. OK Java 8 TESTS 3 171 7987200
241846711 code_verse B Jan. 15, 2024, 6:12 p.m. OK Java 8 TESTS 3 202 0
241844013 k.SUMANTH B Jan. 15, 2024, 5:52 p.m. OK Java 8 TESTS 3 202 0
241841823 byratda B Jan. 15, 2024, 5:36 p.m. OK Java 8 TESTS 3 233 0
241835699 MUKERA_NITHISHA B Jan. 15, 2024, 4:59 p.m. OK Java 8 TESTS 3 233 0
241859229 arvindf232 B Jan. 15, 2024, 9:06 p.m. OK Kotlin 1.9 TESTS 11 342 7577600
241882202 nipon B Jan. 16, 2024, 5:24 a.m. OK MS C++ 2017 TESTS 11 31 409600
241857528 M-Ahmed-Hussain B Jan. 15, 2024, 8:34 p.m. OK MS C++ 2017 TESTS 11 46 204800
241868174 aluckyboy B Jan. 16, 2024, 1:42 a.m. OK MS C++ 2017 TESTS 11 46 409600
241844750 ArunRoy69 B Jan. 15, 2024, 5:57 p.m. OK MS C++ 2017 TESTS 3 46 409600
241838468 Tumyr B Jan. 15, 2024, 5:13 p.m. OK MS C++ 2017 TESTS 3 46 409600
241833813 Protocode B Jan. 15, 2024, 4:51 p.m. OK MS C++ 2017 TESTS 3 46 409600
241831414 Imarjob_enjoyer B Jan. 15, 2024, 4:47 p.m. OK MS C++ 2017 TESTS 3 46 409600
241868079 HLQ12 B Jan. 16, 2024, 1:40 a.m. OK MS C++ 2017 TESTS 11 62 409600
241850728 navneet_79 B Jan. 15, 2024, 6:51 p.m. OK MS C++ 2017 TESTS 3 62 409600
241837014 kumbharanjali2004 B Jan. 15, 2024, 5:05 p.m. OK MS C++ 2017 TESTS 3 62 409600
241864866 albom45674 B Jan. 16, 2024, 12:15 a.m. OK PHP TESTS 11 61 18944000
241863561 crapcode B Jan. 15, 2024, 11:24 p.m. OK PHP TESTS 11 77 0
241864578 rvronak B Jan. 16, 2024, 12:07 a.m. OK PyPy 3 TESTS 11 405 6656000
241848635 2speek B Jan. 15, 2024, 6:29 p.m. OK PyPy 3 TESTS 3 452 8499200
241832845 anvita_n B Jan. 15, 2024, 4:49 p.m. OK PyPy 3 TESTS 3 467 9216000
241859600 DRDIV B Jan. 15, 2024, 9:14 p.m. OK PyPy 3-64 TESTS 11 78 5529600
241870184 Drunkula B Jan. 16, 2024, 2:27 a.m. OK PyPy 3-64 TESTS 11 93 7782400
241853129 jasmineheart B Jan. 15, 2024, 7:19 p.m. OK PyPy 3-64 TESTS 3 93 11878400
241834197 GirirajParik_08 B Jan. 15, 2024, 4:53 p.m. OK PyPy 3-64 TESTS 3 108 7577600
241868319 mikeac B Jan. 16, 2024, 1:46 a.m. OK PyPy 3-64 TESTS 11 108 8806400
241871304 amongsus B Jan. 16, 2024, 2:47 a.m. OK PyPy 3-64 TESTS 11 109 8089600
241842256 NitroSpear B Jan. 15, 2024, 5:39 p.m. OK PyPy 3-64 TESTS 3 109 9625600
241839950 CodePhantom_2104 B Jan. 15, 2024, 5:23 p.m. OK PyPy 3-64 TESTS 3 124 8294400
241850422 nealzane B Jan. 15, 2024, 6:48 p.m. OK PyPy 3-64 TESTS 3 124 8908800
241861228 Deecey01 B Jan. 15, 2024, 9:55 p.m. OK PyPy 3-64 TESTS 11 124 9216000
241848369 OLOGY B Jan. 15, 2024, 6:27 p.m. OK Python 2 TESTS 3 77 1228800
241839631 aryan_1729_ B Jan. 15, 2024, 5:21 p.m. OK Python 3 TESTS 3 46 614400
241870032 manohar_iitg B Jan. 16, 2024, 2:24 a.m. OK Python 3 TESTS 11 93 512000
241860252 LizzieReed B Jan. 15, 2024, 9:29 p.m. OK Python 3 TESTS 11 93 512000
241845951 _BREEZE_ B Jan. 15, 2024, 6:07 p.m. OK Python 3 TESTS 3 93 512000
241836328 JishaRox B Jan. 15, 2024, 5:02 p.m. OK Python 3 TESTS 3 93 2662400
241834310 lerp B Jan. 15, 2024, 4:53 p.m. OK Python 3 TESTS 3 93 4812800
241879870 Naikwad27 B Jan. 16, 2024, 4:56 a.m. OK Python 3 TESTS 11 108 512000
241863465 prashant070800 B Jan. 15, 2024, 11:20 p.m. OK Python 3 TESTS 11 108 512000
241863354 phantrongnghia510 B Jan. 15, 2024, 11:15 p.m. OK Python 3 TESTS 11 108 512000
241863043 vented B Jan. 15, 2024, 11:02 p.m. OK Python 3 TESTS 11 108 512000
241863635 0x81 B Jan. 15, 2024, 11:27 p.m. OK Ruby 3 TESTS 11 498 2662400
241858303 liut B Jan. 15, 2024, 8:47 p.m. OK Rust 2021 TESTS 11 15 409600

remove filters

Back to search problems