Codeforces Round 866 (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
1820 Codeforces Round 866 (Div. 2) FINISHED False 7200 55716863 April 15, 2023, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15583 ) B JoJo's Incredible Adventures PROGRAMMING math strings two pointers

B'Did you think there was going to be a JoJo legend here? But no, that was me, Dio! Given a binary string s of length n , consisting of characters 0 and 1. Let 's build a square table of size n x n , consisting of 0 and 1 characters as follows. In the first row of the table write the original string s . In the second row of the table write cyclic shift of the string s by one to the right. In the third row of the table, write the cyclic shift of line s by two to the right. And so on. Thus, the row with number k will contain a cyclic shift of string s by k to the right. The rows are numbered from 0 to n - 1 top-to-bottom. In the resulting table we need to find the rectangle consisting only of ones that has the largest area. We call a rectangle the set of all cells (i, j) in the table, such that x_1 <= i <= x_2 and y_1 <= j <= y_2 for some integers 0 <= x_1 <= x_2 < n and 0 <= y_1 <= y_2 < n . Recall that the cyclic shift of string s by k to the right is the string s_{n-k+1} ldots s_n s_1 s_2 ldots s_{n-k} . For example, the cyclic shift of the string "01011" by 0 to the right is the string itself "01011", its cyclic shift by 3 to the right is the string "01101". Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 2 cdot 10^4 ) -- the number of test cases. The description of test cases follows. The first and the only line of each test case contains a single binary string s ( 1 <= lvert s rvert <= 2 cdot 10^5 ), consisting of characters 0 and 1. It is guaranteed that the sum of string lengths |s| over all test cases does not exceed 2 cdot 10^5 . For each test case, output a single integer -- the maximum area of a rectangle consisting only of ones. If there is no such rectangle, output 0 . In the first test case, there is a table 1 t'...

Tutorials

Codeforces Round #866 (Div.1, Div.2, based on Lipetsk Team Olympiad) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
202243800 scixing B April 15, 2023, 1:01 p.m. OK C# 10 TESTS 9 140 614400
202222709 lionvs132 B April 15, 2023, 10:47 a.m. OK C# 8 TESTS 9 155 716800
202238799 iit2021113 B April 15, 2023, 12:22 p.m. OK Clang++20 Diagnostics TESTS 9 218 13004800
202237327 iffatul_anon B April 15, 2023, 12:10 p.m. OK GNU C11 TESTS 9 77 1024000
202251817 astronom1cal B April 15, 2023, 2:03 p.m. OK GNU C11 TESTS 9 78 204800
202250950 astronom1cal B April 15, 2023, 1:57 p.m. OK GNU C11 TESTS 9 124 204800
202222830 kaustubh_1806 B April 15, 2023, 10:47 a.m. OK GNU C++14 TESTS 9 0 1024000
202324351 happy124hh B April 16, 2023, 4:55 a.m. OK GNU C++14 TESTS 9 15 204800
202260691 zhongXXS B April 15, 2023, 3:20 p.m. OK GNU C++14 TESTS 9 15 204800
202253227 unin3 B April 15, 2023, 2:14 p.m. OK GNU C++14 TESTS 9 15 204800
202262006 another_fake_account B April 15, 2023, 3:32 p.m. OK GNU C++14 TESTS 9 15 512000
202261635 omeganot B April 15, 2023, 3:29 p.m. OK GNU C++14 TESTS 9 15 512000
202258522 shohagfaraji B April 15, 2023, 3 p.m. OK GNU C++14 TESTS 9 15 512000
202294670 Arnold156 B April 15, 2023, 8:12 p.m. OK GNU C++14 TESTS 9 15 512000
202280777 cftryharder B April 15, 2023, 6:43 p.m. OK GNU C++14 TESTS 9 15 512000
202269752 kvssg123 B April 15, 2023, 4:54 p.m. OK GNU C++14 TESTS 9 15 512000
202224408 codeminem B April 15, 2023, 10:52 a.m. OK GNU C++17 TESTS 9 0 512000
202238581 xingeneral B April 15, 2023, 12:21 p.m. OK GNU C++17 TESTS 9 0 512000
202314450 uuranus B April 16, 2023, 1:52 a.m. OK GNU C++17 TESTS 9 15 204800
202314904 Blueberry_1 B April 16, 2023, 2:01 a.m. OK GNU C++17 TESTS 9 15 204800
202226644 Gold_Dragon B April 15, 2023, 10:58 a.m. OK GNU C++17 TESTS 9 15 307200
202225533 silverbullet111 B April 15, 2023, 10:55 a.m. OK GNU C++17 TESTS 9 15 409600
202326720 darkshadow19 B April 16, 2023, 5:29 a.m. OK GNU C++17 TESTS 9 15 512000
202326501 vansh_bilwal B April 16, 2023, 5:27 a.m. OK GNU C++17 TESTS 9 15 512000
202327113 Shoib_24jul B April 16, 2023, 5:35 a.m. OK GNU C++17 TESTS 9 15 512000
202328011 SOUDI B April 16, 2023, 5:48 a.m. OK GNU C++17 TESTS 9 15 512000
202239043 eiqkx B April 15, 2023, 12:25 p.m. OK GNU C++17 (64) TESTS 9 0 512000
202225524 danielvitor23 B April 15, 2023, 10:55 a.m. OK GNU C++17 (64) TESTS 9 15 512000
202309522 Edu175 B April 16, 2023, 12:02 a.m. OK GNU C++17 (64) TESTS 9 15 512000
202254135 not_ahmed_hamed B April 15, 2023, 2:22 p.m. OK GNU C++17 (64) TESTS 9 15 512000
202235932 saugataroy B April 15, 2023, 12:02 p.m. OK GNU C++17 (64) TESTS 9 15 512000
202235778 saugataroy B April 15, 2023, 12:01 p.m. OK GNU C++17 (64) TESTS 9 15 512000
202229327 _jayant.pranjal_ B April 15, 2023, 11:04 a.m. OK GNU C++17 (64) TESTS 9 15 512000
202222714 AIR_1_soon B April 15, 2023, 10:47 a.m. OK GNU C++17 (64) TESTS 9 15 512000
202312481 CollapseY B April 16, 2023, 1:10 a.m. OK GNU C++17 (64) TESTS 9 15 716800
202251751 Lenlynn B April 15, 2023, 2:03 p.m. OK GNU C++17 (64) TESTS 9 15 921600
202320691 Christins B April 16, 2023, 3:49 a.m. OK GNU C++20 (64) TESTS 9 0 512000
202317854 Eslam_Saleh B April 16, 2023, 2:59 a.m. OK GNU C++20 (64) TESTS 9 0 512000
202311494 Ashutosh.Singh B April 16, 2023, 12:48 a.m. OK GNU C++20 (64) TESTS 9 0 512000
202309395 Elagamy B April 15, 2023, 11:59 p.m. OK GNU C++20 (64) TESTS 9 0 512000
202323371 Jiaye. B April 16, 2023, 4:38 a.m. OK GNU C++20 (64) TESTS 9 0 512000
202277315 maxim.yurchuk B April 15, 2023, 6:07 p.m. OK GNU C++20 (64) TESTS 9 0 512000
202274429 dshrey27 B April 15, 2023, 5:37 p.m. OK GNU C++20 (64) TESTS 9 0 512000
202274380 mastersensei279 B April 15, 2023, 5:37 p.m. OK GNU C++20 (64) TESTS 9 0 512000
202299721 deep_aman B April 15, 2023, 9:13 p.m. OK GNU C++20 (64) TESTS 9 0 512000
202322956 eternal_happiness B April 16, 2023, 4:31 a.m. OK GNU C++20 (64) TESTS 9 0 512000
202240541 IvanRenison B April 15, 2023, 12:37 p.m. OK Haskell TESTS 9 62 6348800
202312454 Yousef_Badr B April 16, 2023, 1:10 a.m. OK Java 11 TESTS 9 186 0
202261725 WORTH B April 15, 2023, 3:30 p.m. OK Java 11 TESTS 9 187 0
202236454 CutSandstone B April 15, 2023, 12:05 p.m. OK Java 11 TESTS 9 187 0
202237998 Yousef_Badr B April 15, 2023, 12:16 p.m. OK Java 11 TESTS 9 202 0
202223636 Abhinav__hadole B April 15, 2023, 10:49 a.m. OK Java 11 TESTS 9 202 0
202246853 vijender_8601 B April 15, 2023, 1:25 p.m. OK Java 11 TESTS 9 233 0
202280606 Kempachi B April 15, 2023, 6:41 p.m. OK Java 11 TESTS 9 233 0
202260337 ilasiawo B April 15, 2023, 3:17 p.m. OK Java 11 TESTS 9 264 0
202246199 XIN B April 15, 2023, 1:21 p.m. OK Java 11 TESTS 9 280 0
202240891 g_square B April 15, 2023, 12:39 p.m. OK Java 11 TESTS 9 280 0
202235980 Hawater B April 15, 2023, 12:02 p.m. OK Java 17 TESTS 9 156 0
202245985 mlangc B April 15, 2023, 1:19 p.m. OK Java 17 TESTS 9 202 0
202266605 mcrash12 B April 15, 2023, 4:16 p.m. OK Java 17 TESTS 9 217 0
202240872 Badass_Nemesis B April 15, 2023, 12:39 p.m. OK Java 17 TESTS 9 218 0
202259303 this.is.shivamsingh B April 15, 2023, 3:07 p.m. OK Java 17 TESTS 9 249 204800
202223137 S.Meghala B April 15, 2023, 10:48 a.m. OK Java 17 TESTS 9 249 409600
202253906 sid234890 B April 15, 2023, 2:20 p.m. OK Java 17 TESTS 9 296 0
202305428 Hinnawi24 B April 15, 2023, 10:40 p.m. OK Java 8 TESTS 9 109 0
202262850 Hinnawi24 B April 15, 2023, 3:41 p.m. OK Java 8 TESTS 9 109 0
202312421 faresbadr316 B April 16, 2023, 1:09 a.m. OK Java 8 TESTS 9 124 0
202312374 faresbadr316 B April 16, 2023, 1:08 a.m. OK Java 8 TESTS 9 124 0
202225194 CloseToYou B April 15, 2023, 10:54 a.m. OK Java 8 TESTS 9 124 0
202253216 ahmedTarek28 B April 15, 2023, 2:14 p.m. OK Java 8 TESTS 9 139 0
202238426 UzmakiNaruto B April 15, 2023, 12:19 p.m. OK Java 8 TESTS 9 139 0
202305214 Hinnawi24 B April 15, 2023, 10:36 p.m. OK Java 8 TESTS 9 155 0
202315467 mohamedhassan_c B April 16, 2023, 2:13 a.m. OK Java 8 TESTS 9 156 17920000
202278913 victor_t B April 15, 2023, 6:23 p.m. OK Java 8 TESTS 9 171 0
202224788 hnust_panying B April 15, 2023, 10:53 a.m. OK MS C++ 2017 TESTS 9 62 204800
202224515 hnust_liuyongheng B April 15, 2023, 10:52 a.m. OK MS C++ 2017 TESTS 9 62 204800
202318105 ishybee B April 16, 2023, 3:04 a.m. OK MS C++ 2017 TESTS 9 62 614400
202305358 incuiio B April 15, 2023, 10:39 p.m. OK MS C++ 2017 TESTS 9 62 614400
202245069 Iseeuinmyd B April 15, 2023, 1:12 p.m. OK MS C++ 2017 TESTS 9 62 614400
202241497 EbuYandex B April 15, 2023, 12:44 p.m. OK MS C++ 2017 TESTS 9 62 614400
202296624 adesh123 B April 15, 2023, 8:35 p.m. OK MS C++ 2017 TESTS 9 77 1331200
202296760 adesh123 B April 15, 2023, 8:36 p.m. OK MS C++ 2017 TESTS 9 93 1024000
202239427 swseverance B April 15, 2023, 12:28 p.m. OK Node.js TESTS 9 108 4608000
202240287 swseverance B April 15, 2023, 12:35 p.m. OK Node.js TESTS 9 139 6553600
202239857 swseverance B April 15, 2023, 12:31 p.m. OK Node.js TESTS 9 140 5632000
202245531 swseverance B April 15, 2023, 1:15 p.m. OK Node.js TESTS 9 155 6041600
202246042 swseverance B April 15, 2023, 1:19 p.m. OK Node.js TESTS 9 202 6963200
202245213 swseverance B April 15, 2023, 1:13 p.m. OK Node.js TESTS 9 217 6451200
202225273 osato B April 15, 2023, 10:54 a.m. OK Node.js TESTS 9 218 5324800
202239635 swseverance B April 15, 2023, 12:29 p.m. OK Node.js TESTS 9 421 6451200
202223812 appleartic999 B April 15, 2023, 10:50 a.m. OK PyPy 3 TESTS 9 155 13926400
202223486 rafgiav B April 15, 2023, 10:49 a.m. OK PyPy 3 TESTS 9 170 5632000
202242303 crows1 B April 15, 2023, 12:50 p.m. OK PyPy 3 TESTS 9 264 4403200
202226836 2momo2 B April 15, 2023, 10:58 a.m. OK PyPy 3 TESTS 9 295 14540800
202236425 jvatsal0709 B April 15, 2023, 12:05 p.m. OK PyPy 3 TESTS 9 326 8294400
202257459 gsomani B April 15, 2023, 2:51 p.m. OK PyPy 3 TESTS 9 389 7065600
202226807 harshini.paranjape B April 15, 2023, 10:58 a.m. OK PyPy 3 TESTS 9 467 10956800
202301210 voicon B April 15, 2023, 9:32 p.m. OK PyPy 3-64 TESTS 9 124 6553600
202240675 in.harshitgarg B April 15, 2023, 12:38 p.m. OK PyPy 3-64 TESTS 9 124 9113600
202236777 aayush_chhabra B April 15, 2023, 12:07 p.m. OK PyPy 3-64 TESTS 9 140 17715200
202272418 -Neel- B April 15, 2023, 5:23 p.m. OK PyPy 3-64 TESTS 9 140 20480000
202281474 pirate0 B April 15, 2023, 6:51 p.m. OK PyPy 3-64 TESTS 9 155 9318400
202279352 isekun B April 15, 2023, 6:27 p.m. OK PyPy 3-64 TESTS 9 156 6860800
202259567 RobinFromTheHood B April 15, 2023, 3:09 p.m. OK PyPy 3-64 TESTS 9 170 9420800
202253144 SophieHatter B April 15, 2023, 2:14 p.m. OK PyPy 3-64 TESTS 9 202 9011200
202241112 N3xnoinw8888 B April 15, 2023, 12:41 p.m. OK PyPy 3-64 TESTS 9 202 9523200
202268054 ankitesh B April 15, 2023, 4:33 p.m. OK PyPy 3-64 TESTS 9 218 15769600
202312173 koinokoe B April 16, 2023, 1:04 a.m. OK Python 3 TESTS 9 155 921600
202277043 Pratyyush B April 15, 2023, 6:05 p.m. OK Python 3 TESTS 9 171 1843200
202223301 Keshiiika B April 15, 2023, 10:48 a.m. OK Python 3 TESTS 9 187 1126400
202222947 ali.alamdari B April 15, 2023, 10:47 a.m. OK Python 3 TESTS 9 217 6348800
202225409 bubbotee B April 15, 2023, 10:54 a.m. OK Python 3 TESTS 9 218 1945600
202226411 arihant.vashista14 B April 15, 2023, 10:57 a.m. OK Python 3 TESTS 9 218 4198400
202236912 MohmadZaid._. B April 15, 2023, 12:08 p.m. OK Python 3 TESTS 9 233 2252800
202240798 Ferrriccc B April 15, 2023, 12:39 p.m. OK Python 3 TESTS 9 249 614400
202273820 sum_it. B April 15, 2023, 5:31 p.m. OK Python 3 TESTS 9 249 1945600
202237670 OzodbekX B April 15, 2023, 12:13 p.m. OK Python 3 TESTS 9 264 716800
202260917 zheland B April 15, 2023, 3:22 p.m. OK Rust 2021 TESTS 9 15 512000
202260738 ilyshana B April 15, 2023, 3:20 p.m. OK Rust 2021 TESTS 9 15 819200
202226725 ofen01 B April 15, 2023, 10:58 a.m. OK Rust 2021 TESTS 9 140 819200

remove filters

Back to search problems