Codeforces Round 843 (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
1775 Codeforces Round 843 (Div. 2) FINISHED False 9000 58473899 Jan. 10, 2023, 11:15 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18844 ) A2 Gardener and the Capybaras (hard version) PROGRAMMING constructive algorithms greedy strings

B'This is an hard version of the problem. The difference between the versions is that the string can be longer than in the easy version. You can only do hacks if both versions of the problem are passed. Kazimir Kazimirovich is a Martian gardener. He has a huge orchard of binary balanced apple trees. Recently Casimir decided to get himself three capybaras. The gardener even came up with their names and wrote them down on a piece of paper. The name of each capybara is a non-empty line consisting of letters "a" and "b". Denote the names of the capybaras by the lines a , b , and c . Then Casimir wrote the nonempty lines a , b , and c in a row without spaces. For example, if the capybara 's name was "aba", "ab", and "bb", then the string the gardener wrote down would look like "abaabbb". The gardener remembered an interesting property: either the string b is lexicographically not smaller than the strings a and c at the same time, or the string b is lexicographically not greater than the strings a and c at the same time. In other words, either a <= b and c <= b are satisfied, or b <= a and b <= c are satisfied (or possibly both conditions simultaneously). Here <= denotes the lexicographic "less than or equal to" for strings. Thus, a <= b means that the strings must either be equal, or the string a must stand earlier in the dictionary than the string b . For a more detailed explanation of this operation, see "Notes" section. Today the gardener looked at his notes and realized that he cannot recover the names because they are written without spaces. He is no longer sure if he can recover the original strings a , b , and c , so he wants to find any triplet of names that satisfy the above property. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). The description o'...

Tutorials

Codeforces Round #843 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
188791389 Wizard_of_Orz A2 Jan. 10, 2023, 5:22 p.m. OK Clang++17 Diagnostics TESTS 31 186 14233600
188770001 F1L0N A2 Jan. 10, 2023, 2:55 p.m. OK Clang++20 Diagnostics TESTS 29 108 14233600
188830641 aabc A2 Jan. 11, 2023, 4:37 a.m. OK Clang++20 Diagnostics TESTS 31 295 13414400
188820395 phymien A2 Jan. 11, 2023, 1:39 a.m. OK GNU C11 TESTS 31 31 204800
188827385 gigajet A2 Jan. 11, 2023, 3:46 a.m. OK GNU C11 TESTS 31 139 204800
188834632 zzyhlhdy A2 Jan. 11, 2023, 5:31 a.m. OK GNU C11 TESTS 31 171 204800
188797750 __sha___ A2 Jan. 10, 2023, 6:14 p.m. OK GNU C11 TESTS 31 919 204800
188818331 luogu_bot1 A2 Jan. 11, 2023, 12:43 a.m. OK GNU C++14 TESTS 31 15 204800
188775871 Xanadu13 A2 Jan. 10, 2023, 3:28 p.m. OK GNU C++14 TESTS 31 15 512000
188781557 pjccccc A2 Jan. 10, 2023, 4:08 p.m. OK GNU C++14 TESTS 31 15 512000
188782328 ar080304 A2 Jan. 10, 2023, 4:14 p.m. OK GNU C++14 TESTS 31 15 819200
188773188 a.rzhewin A2 Jan. 10, 2023, 3:12 p.m. OK GNU C++14 TESTS 30 15 819200
188772301 JustAGhost23 A2 Jan. 10, 2023, 3:07 p.m. OK GNU C++14 TESTS 29 15 819200
188821967 shivamdgp7 A2 Jan. 11, 2023, 2:12 a.m. OK GNU C++14 TESTS 31 15 819200
188823593 codingMIKU A2 Jan. 11, 2023, 2:41 a.m. OK GNU C++14 TESTS 31 15 819200
188831237 Anil_24 A2 Jan. 11, 2023, 4:45 a.m. OK GNU C++14 TESTS 31 15 819200
188790704 Heliummm A2 Jan. 10, 2023, 5:16 p.m. OK GNU C++14 TESTS 31 15 819200
188801775 nnv-nick A2 Jan. 10, 2023, 6:52 p.m. OK GNU C++17 TESTS 31 15 512000
188799233 ZM00 A2 Jan. 10, 2023, 6:26 p.m. OK GNU C++17 TESTS 31 15 614400
188792363 ilija_IR_13 A2 Jan. 10, 2023, 5:29 p.m. OK GNU C++17 TESTS 31 15 614400
188829828 PowerBond A2 Jan. 11, 2023, 4:24 a.m. OK GNU C++17 TESTS 31 15 819200
188829722 0855250956 A2 Jan. 11, 2023, 4:22 a.m. OK GNU C++17 TESTS 31 15 819200
188829677 Lanly A2 Jan. 11, 2023, 4:21 a.m. OK GNU C++17 TESTS 31 15 819200
188833356 advait_cs A2 Jan. 11, 2023, 5:15 a.m. OK GNU C++17 TESTS 31 15 819200
188833404 advait_cs A2 Jan. 11, 2023, 5:15 a.m. OK GNU C++17 TESTS 31 15 819200
188830739 direction_ A2 Jan. 11, 2023, 4:38 a.m. OK GNU C++17 TESTS 31 15 819200
188829841 yzyyds A2 Jan. 11, 2023, 4:24 a.m. OK GNU C++17 TESTS 31 15 819200
188798785 BetoSCL A2 Jan. 10, 2023, 6:22 p.m. OK GNU C++17 (64) TESTS 31 15 819200
188832879 efficient A2 Jan. 11, 2023, 5:08 a.m. OK GNU C++17 (64) TESTS 31 15 819200
188832754 nodoVT A2 Jan. 11, 2023, 5:07 a.m. OK GNU C++17 (64) TESTS 31 15 819200
188831126 RF_Faisal A2 Jan. 11, 2023, 4:44 a.m. OK GNU C++17 (64) TESTS 31 15 819200
188821278 linxd A2 Jan. 11, 2023, 2 a.m. OK GNU C++17 (64) TESTS 31 15 819200
188813216 sameh_tarek A2 Jan. 10, 2023, 10:05 p.m. OK GNU C++17 (64) TESTS 31 15 819200
188782372 Mohit. A2 Jan. 10, 2023, 4:14 p.m. OK GNU C++17 (64) TESTS 31 15 819200
188774228 arnold27 A2 Jan. 10, 2023, 3:18 p.m. OK GNU C++17 (64) TESTS 31 15 819200
188771235 ankit.himself A2 Jan. 10, 2023, 3:01 p.m. OK GNU C++17 (64) TESTS 29 15 819200
188807505 DedsecKnight A2 Jan. 10, 2023, 8:06 p.m. OK GNU C++17 (64) TESTS 31 15 1024000
188780161 llking A2 Jan. 10, 2023, 3:58 p.m. OK GNU C++20 (64) TESTS 31 15 204800
188834881 vardan_09 A2 Jan. 11, 2023, 5:34 a.m. OK GNU C++20 (64) TESTS 31 15 819200
188834750 87109145 A2 Jan. 11, 2023, 5:32 a.m. OK GNU C++20 (64) TESTS 31 15 819200
188834573 Kate613 A2 Jan. 11, 2023, 5:30 a.m. OK GNU C++20 (64) TESTS 31 15 819200
188832643 hustlerr A2 Jan. 11, 2023, 5:06 a.m. OK GNU C++20 (64) TESTS 31 15 819200
188831203 thangdz2k7 A2 Jan. 11, 2023, 4:45 a.m. OK GNU C++20 (64) TESTS 31 15 819200
188837231 UUUnmei A2 Jan. 11, 2023, 6:01 a.m. OK GNU C++20 (64) TESTS 31 15 819200
188837313 vikky91 A2 Jan. 11, 2023, 6:01 a.m. OK GNU C++20 (64) TESTS 31 15 819200
188836414 sparrow_14 A2 Jan. 11, 2023, 5:52 a.m. OK GNU C++20 (64) TESTS 31 15 819200
188834882 Niloy_Das_19 A2 Jan. 11, 2023, 5:34 a.m. OK GNU C++20 (64) TESTS 31 15 819200
188803529 ETHANHUNTMI5 A2 Jan. 10, 2023, 7:12 p.m. OK Java 11 TESTS 31 186 0
188814339 wantu A2 Jan. 10, 2023, 10:38 p.m. OK Java 11 TESTS 31 202 0
188799544 wat2 A2 Jan. 10, 2023, 6:29 p.m. OK Java 11 TESTS 31 217 1433600
188788235 princeayush04 A2 Jan. 10, 2023, 4:56 p.m. OK Java 11 TESTS 31 218 0
188792888 rishisingh7012 A2 Jan. 10, 2023, 5:34 p.m. OK Java 11 TESTS 31 233 0
188784755 SaberXpro A2 Jan. 10, 2023, 4:31 p.m. OK Java 11 TESTS 31 233 0
188782325 months13 A2 Jan. 10, 2023, 4:14 p.m. OK Java 11 TESTS 31 249 614400
188780052 13months A2 Jan. 10, 2023, 3:57 p.m. OK Java 11 TESTS 31 249 614400
188829819 ok.surazz A2 Jan. 11, 2023, 4:23 a.m. OK Java 11 TESTS 31 296 0
188787936 kasiru_69 A2 Jan. 10, 2023, 4:54 p.m. OK Java 11 TESTS 31 312 0
188771857 kkz666 A2 Jan. 10, 2023, 3:04 p.m. OK Java 17 TESTS 29 217 614400
188771495 Rock111 A2 Jan. 10, 2023, 3:02 p.m. OK Java 17 TESTS 29 265 409600
188791168 not_just_rr A2 Jan. 10, 2023, 5:20 p.m. OK Java 17 TESTS 31 280 1024000
188775343 varrick A2 Jan. 10, 2023, 3:25 p.m. OK Java 17 TESTS 31 280 1024000
188793022 Ani_Vishwakarma A2 Jan. 10, 2023, 5:35 p.m. OK Java 17 TESTS 31 327 921600
188814056 wokewagey99 A2 Jan. 10, 2023, 10:30 p.m. OK Java 8 TESTS 31 109 0
188808569 tejasS-27 A2 Jan. 10, 2023, 8:25 p.m. OK Java 8 TESTS 31 124 0
188830769 tong96 A2 Jan. 11, 2023, 4:39 a.m. OK Java 8 TESTS 31 139 0
188827485 lpychemistry A2 Jan. 11, 2023, 3:47 a.m. OK Java 8 TESTS 31 140 0
188772634 Sanat04 A2 Jan. 10, 2023, 3:08 p.m. OK Java 8 TESTS 29 156 0
188827459 Divyanshuverma21 A2 Jan. 11, 2023, 3:47 a.m. OK Java 8 TESTS 31 186 0
188777906 khan1121 A2 Jan. 10, 2023, 3:42 p.m. OK Java 8 TESTS 31 186 0
188791068 abhayrajnegi0416 A2 Jan. 10, 2023, 5:19 p.m. OK Java 8 TESTS 31 187 0
188778807 Abhinav__hadole A2 Jan. 10, 2023, 3:49 p.m. OK Java 8 TESTS 31 202 0
188790822 tyrion_123 A2 Jan. 10, 2023, 5:17 p.m. OK Java 8 TESTS 31 312 0
188812510 cptahahab A2 Jan. 10, 2023, 9:47 p.m. OK MS C++ 2017 TESTS 31 46 716800
188778174 qtrez A2 Jan. 10, 2023, 3:44 p.m. OK MS C++ 2017 TESTS 31 46 716800
188772491 adesh123 A2 Jan. 10, 2023, 3:08 p.m. OK MS C++ 2017 TESTS 29 46 716800
188812221 Spartan3002 A2 Jan. 10, 2023, 9:39 p.m. OK MS C++ 2017 TESTS 31 46 921600
188827358 Ir0nic_Joker A2 Jan. 11, 2023, 3:45 a.m. OK MS C++ 2017 TESTS 31 61 716800
188809755 Prabhat.kr.verman A2 Jan. 10, 2023, 8:46 p.m. OK MS C++ 2017 TESTS 31 61 716800
188786660 Jackhandsome379 A2 Jan. 10, 2023, 4:45 p.m. OK MS C++ 2017 TESTS 31 61 716800
188775134 zixiang A2 Jan. 10, 2023, 3:24 p.m. OK MS C++ 2017 TESTS 31 61 716800
188813581 payday3 A2 Jan. 10, 2023, 10:15 p.m. OK MS C++ 2017 TESTS 31 62 716800
188787490 k26rahul A2 Jan. 10, 2023, 4:51 p.m. OK Node.js TESTS 31 249 9728000
188777647 vishu.ut A2 Jan. 10, 2023, 3:40 p.m. OK PyPy 3 TESTS 31 93 4300800
188781039 Yash_Nandwana A2 Jan. 10, 2023, 4:04 p.m. OK PyPy 3 TESTS 31 155 5222400
188795300 undertaker271 A2 Jan. 10, 2023, 5:54 p.m. OK PyPy 3 TESTS 31 187 74752000
188789338 u1602016 A2 Jan. 10, 2023, 5:05 p.m. OK PyPy 3 TESTS 31 218 19046400
188774923 AadiS A2 Jan. 10, 2023, 3:23 p.m. OK PyPy 3 TESTS 31 280 6553600
188797043 madhav_5 A2 Jan. 10, 2023, 6:08 p.m. OK PyPy 3 TESTS 31 295 6553600
188774647 AhsanHabib A2 Jan. 10, 2023, 3:21 p.m. OK PyPy 3 TESTS 31 311 5836800
188788496 torqueaj A2 Jan. 10, 2023, 4:58 p.m. OK PyPy 3 TESTS 31 311 8192000
188800094 NenadDapic A2 Jan. 10, 2023, 6:34 p.m. OK PyPy 3 TESTS 31 327 6144000
188770128 bboo_123 A2 Jan. 10, 2023, 2:56 p.m. OK PyPy 3 TESTS 29 327 6656000
188777316 Triump_0112 A2 Jan. 10, 2023, 3:38 p.m. OK PyPy 3-64 TESTS 31 93 7782400
188779510 OmarMoBadr A2 Jan. 10, 2023, 3:54 p.m. OK PyPy 3-64 TESTS 31 108 25292800
188789854 Yansou A2 Jan. 10, 2023, 5:09 p.m. OK PyPy 3-64 TESTS 31 109 6656000
188795571 gardengnome A2 Jan. 10, 2023, 5:57 p.m. OK PyPy 3-64 TESTS 31 109 8192000
188818746 meat124 A2 Jan. 11, 2023, 12:55 a.m. OK PyPy 3-64 TESTS 31 109 9011200
188794757 govindp47 A2 Jan. 10, 2023, 5:50 p.m. OK PyPy 3-64 TESTS 31 124 27340800
188797001 KA_Rma A2 Jan. 10, 2023, 6:08 p.m. OK PyPy 3-64 TESTS 31 140 9216000
188795729 Mohamed_Hamed A2 Jan. 10, 2023, 5:58 p.m. OK PyPy 3-64 TESTS 31 140 9830400
188789904 nealzane A2 Jan. 10, 2023, 5:10 p.m. OK PyPy 3-64 TESTS 31 186 10137600
188800037 NenadDapic A2 Jan. 10, 2023, 6:34 p.m. OK PyPy 3-64 TESTS 31 202 7884800
188770716 eugalt A2 Jan. 10, 2023, 2:58 p.m. OK Python 3 TESTS 29 77 921600
188802500 Khalil.Hosni A2 Jan. 10, 2023, 6:59 p.m. OK Python 3 TESTS 31 77 1024000
188815098 Vidhate A2 Jan. 10, 2023, 11:05 p.m. OK Python 3 TESTS 31 77 1433600
188830989 abhay_30281125 A2 Jan. 11, 2023, 4:42 a.m. OK Python 3 TESTS 31 108 716800
188829417 nitin2203 A2 Jan. 11, 2023, 4:17 a.m. OK Python 3 TESTS 31 124 716800
188798827 GiroHiro A2 Jan. 10, 2023, 6:22 p.m. OK Python 3 TESTS 31 124 716800
188833093 Aryan28 A2 Jan. 11, 2023, 5:11 a.m. OK Python 3 TESTS 31 124 921600
188800004 NenadDapic A2 Jan. 10, 2023, 6:33 p.m. OK Python 3 TESTS 31 124 1126400
188790110 sum_it. A2 Jan. 10, 2023, 5:11 p.m. OK Python 3 TESTS 31 124 1126400
188775956 Apul_Ranjan A2 Jan. 10, 2023, 3:29 p.m. OK Python 3 TESTS 31 124 3891200
188791910 liut A2 Jan. 10, 2023, 5:26 p.m. OK Rust 2021 TESTS 31 15 819200

remove filters

Back to search problems