Codeforces Round 879 (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
1834 Codeforces Round 879 (Div. 2) FINISHED False 7200 50190863 June 18, 2023, 8:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13700 ) C Game with Reversing PROGRAMMING games strings

B"Alice and Bob are playing a game. They have two strings S and T of the same length n consisting of lowercase latin letters. Players take turns alternately, with Alice going first. On her turn, Alice chooses an integer i from 1 to n , one of the strings S or T , and any lowercase latin letter c , and replaces the i -th symbol in the chosen string with the character c . On his turn, Bob chooses one of the strings S or T , and reverses it. More formally, Bob makes the replacement S := operatorname{rev}(S) or T := operatorname{rev}(T) , where operatorname{rev}(P) = P_n P_{n-1} ldots P_1 . The game lasts until the strings S and T are equal. As soon as the strings become equal, the game ends instantly. Define the duration of the game as the total number of moves made by both players during the game. For example, if Alice made 2 moves in total, and Bob made 1 move, then the duration of this game is 3 . Alice's goal is to minimize the duration of the game, and Bob's goal is to maximize the duration of the game. What will be the duration of the game, if both players play optimally? It can be shown that the game will end in a finite number of turns. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 10^5 ) -- the length of the strings S and T . The second line of each test case contains a string S of length n consisting of lowercase latin letters. The third line of each test case contains a string T of length n consisting of lowercase latin letters. It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case, output a single number on a separate line -- the duration"...

Tutorials

Codeforces Round #879 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
210194348 chrisTris C June 19, 2023, 2:07 a.m. OK C# 10 TESTS 8 46 1331200
210080829 ironpurush3039 C June 18, 2023, 10 a.m. OK C# 10 TESTS 8 92 2867200
210109961 scixing C June 18, 2023, 2:36 p.m. OK C# 10 TESTS 8 93 1126400
210103566 TaylorFly C June 18, 2023, 1:30 p.m. OK Clang++17 Diagnostics TESTS 8 139 12595200
210081044 apricot2012 C June 18, 2023, 10 a.m. OK GNU C++14 TESTS 8 0 512000
210192157 QZJ114514 C June 19, 2023, 1:03 a.m. OK GNU C++14 TESTS 8 15 204800
210191781 Eznibuil C June 19, 2023, 12:53 a.m. OK GNU C++14 TESTS 8 15 204800
210188925 zltzlt C June 18, 2023, 11:11 p.m. OK GNU C++14 TESTS 8 15 204800
210188589 Lagerent C June 18, 2023, 10:57 p.m. OK GNU C++14 TESTS 8 15 204800
210094605 llingy C June 18, 2023, 11:49 a.m. OK GNU C++14 TESTS 8 15 204800
210094561 llingy C June 18, 2023, 11:49 a.m. OK GNU C++14 TESTS 8 15 204800
210093284 wifi32767 C June 18, 2023, 11:36 a.m. OK GNU C++14 TESTS 8 15 204800
210087009 zltzlt C June 18, 2023, 10:36 a.m. OK GNU C++14 TESTS 8 15 204800
210086407 paul2008 C June 18, 2023, 10:32 a.m. OK GNU C++14 TESTS 8 15 204800
210175640 sohag7th C June 18, 2023, 6:23 p.m. OK GNU C++17 TESTS 8 0 512000
210076709 AndyCF C June 18, 2023, 9:47 a.m. OK GNU C++17 TESTS 8 0 512000
210195562 Wizard_of_Orz C June 19, 2023, 2:34 a.m. OK GNU C++17 TESTS 8 15 204800
210191265 HarperTaylor C June 19, 2023, 12:36 a.m. OK GNU C++17 TESTS 8 15 204800
210080211 yeerxiaoqi C June 18, 2023, 9:58 a.m. OK GNU C++17 TESTS 8 15 204800
210079770 lonewolf154 C June 18, 2023, 9:57 a.m. OK GNU C++17 TESTS 8 15 204800
210074042 xzwys C June 18, 2023, 9:39 a.m. OK GNU C++17 TESTS 8 15 204800
210201283 SF-Manman C June 19, 2023, 4:31 a.m. OK GNU C++17 TESTS 8 15 409600
210192681 HaPpY1213 C June 19, 2023, 1:20 a.m. OK GNU C++17 TESTS 8 15 409600
210086657 ly20211202 C June 18, 2023, 10:33 a.m. OK GNU C++17 TESTS 8 15 409600
210077147 Linver C June 18, 2023, 9:49 a.m. OK GNU C++17 (64) TESTS 8 0 512000
210206178 Knight_of_Nineteen C June 19, 2023, 6 a.m. OK GNU C++17 (64) TESTS 8 15 512000
210190598 244mhq C June 19, 2023, 12:13 a.m. OK GNU C++17 (64) TESTS 8 15 512000
210182152 MohmadZaid._. C June 18, 2023, 8:06 p.m. OK GNU C++17 (64) TESTS 8 15 512000
210105778 HelmOptimum C June 18, 2023, 1:53 p.m. OK GNU C++17 (64) TESTS 8 15 512000
210103638 Mag1sk C June 18, 2023, 1:31 p.m. OK GNU C++17 (64) TESTS 8 15 512000
210101545 efficient C June 18, 2023, 1:04 p.m. OK GNU C++17 (64) TESTS 8 15 512000
210100962 caneloalvarez642 C June 18, 2023, 12:58 p.m. OK GNU C++17 (64) TESTS 8 15 512000
210100362 os-moussao C June 18, 2023, 12:51 p.m. OK GNU C++17 (64) TESTS 8 15 512000
210096533 importlogic C June 18, 2023, 12:09 p.m. OK GNU C++17 (64) TESTS 8 15 512000
210172517 Hope_._._._._ C June 18, 2023, 5:47 p.m. OK GNU C++20 (64) TESTS 8 0 307200
210103504 amr_amin C June 18, 2023, 1:29 p.m. OK GNU C++20 (64) TESTS 8 0 307200
210101102 Gamal74 C June 18, 2023, 12:59 p.m. OK GNU C++20 (64) TESTS 8 0 307200
210099002 Dragonado C June 18, 2023, 12:35 p.m. OK GNU C++20 (64) TESTS 8 0 307200
210096790 kira_zoldyck C June 18, 2023, 12:11 p.m. OK GNU C++20 (64) TESTS 8 0 307200
210096041 Sanam007 C June 18, 2023, 12:04 p.m. OK GNU C++20 (64) TESTS 8 0 307200
210092502 do4z C June 18, 2023, 11:27 a.m. OK GNU C++20 (64) TESTS 8 0 307200
210085298 jagi_song C June 18, 2023, 10:24 a.m. OK GNU C++20 (64) TESTS 8 0 307200
210074586 ignite312 C June 18, 2023, 9:41 a.m. OK GNU C++20 (64) TESTS 8 0 307200
210203605 dimss C June 19, 2023, 5:16 a.m. OK GNU C++20 (64) TESTS 8 0 409600
210196616 cck111 C June 19, 2023, 2:59 a.m. OK Go TESTS 8 15 1433600
210083700 zyf123 C June 18, 2023, 10:17 a.m. OK Go TESTS 8 31 1024000
210078309 katomasao C June 18, 2023, 9:52 a.m. OK Haskell TESTS 8 93 9523200
210078456 pehle_1200_kar_le C June 18, 2023, 9:53 a.m. OK Java 11 TESTS 8 202 0
210084180 shivanshu_100 C June 18, 2023, 10:19 a.m. OK Java 11 TESTS 8 218 0
210098250 Bucky_ C June 18, 2023, 12:27 p.m. OK Java 11 TESTS 8 233 0
210095741 amank12 C June 18, 2023, 12:01 p.m. OK Java 11 TESTS 8 233 0
210085580 ttannishh C June 18, 2023, 10:26 a.m. OK Java 11 TESTS 8 233 0
210076397 acoder22 C June 18, 2023, 9:46 a.m. OK Java 11 TESTS 8 249 0
210080980 ackuno C June 18, 2023, 10 a.m. OK Java 11 TESTS 8 280 0
210079225 Shounak45 C June 18, 2023, 9:55 a.m. OK Java 11 TESTS 8 280 0
210168432 g_square C June 18, 2023, 5:13 p.m. OK Java 11 TESTS 8 280 39219200
210077640 MK68 C June 18, 2023, 9:50 a.m. OK Java 11 TESTS 8 295 0
210079411 jiangqiao C June 18, 2023, 9:56 a.m. OK Java 17 TESTS 8 155 204800
210081304 Pratham2908 C June 18, 2023, 10:01 a.m. OK Java 17 TESTS 8 187 204800
210168542 dakshkhullar14 C June 18, 2023, 5:13 p.m. OK Java 17 TESTS 8 187 409600
210074054 daksh_02 C June 18, 2023, 9:39 a.m. OK Java 17 TESTS 8 187 409600
210076759 Saurabh_jayaswal C June 18, 2023, 9:47 a.m. OK Java 17 TESTS 8 202 204800
210094655 Hiranmoy C June 18, 2023, 11:50 a.m. OK Java 17 TESTS 8 202 307200
210086095 d2s2 C June 18, 2023, 10:30 a.m. OK Java 17 TESTS 8 202 512000
210075246 parascoding1 C June 18, 2023, 9:43 a.m. OK Java 17 TESTS 8 202 512000
210085856 jimmyd211 C June 18, 2023, 10:28 a.m. OK Java 17 TESTS 8 202 614400
210079166 Cromyl C June 18, 2023, 9:55 a.m. OK Java 17 TESTS 8 217 512000
210086298 Sumitsingh7 C June 18, 2023, 10:31 a.m. OK Java 8 TESTS 8 93 5836800
210146743 hungone C June 18, 2023, 3:44 p.m. OK Java 8 TESTS 8 108 0
210082438 arutsudar C June 18, 2023, 10:04 a.m. OK Java 8 TESTS 8 108 0
210093096 priyaroy3370 C June 18, 2023, 11:33 a.m. OK Java 8 TESTS 8 109 0
210084561 EliudGarcia2004 C June 18, 2023, 10:20 a.m. OK Java 8 TESTS 8 109 0
210079663 abrolu C June 18, 2023, 9:56 a.m. OK Java 8 TESTS 8 109 0
210089720 raj_shahh C June 18, 2023, 10:59 a.m. OK Java 8 TESTS 8 124 38297600
210188489 lpychemistry C June 18, 2023, 10:52 p.m. OK Java 8 TESTS 8 155 0
210097160 lioeva_niuma C June 18, 2023, 12:15 p.m. OK Java 8 TESTS 8 155 0
210078862 aditya888 C June 18, 2023, 9:54 a.m. OK Java 8 TESTS 8 155 0
210088012 gelbelachente C June 18, 2023, 10:44 a.m. OK Kotlin 1.7 TESTS 8 374 6758400
210142310 SlavaG C June 18, 2023, 3:34 p.m. OK Kotlin 1.7 TESTS 8 436 4915200
210132705 rudolf C June 18, 2023, 3:12 p.m. OK Kotlin 1.7 TESTS 8 592 72396800
210078112 MengXn C June 18, 2023, 9:51 a.m. OK MS C++ 2017 TESTS 8 15 409600
210078107 adi854105 C June 18, 2023, 9:51 a.m. OK MS C++ 2017 TESTS 8 15 409600
210095414 tatianyi C June 18, 2023, 11:57 a.m. OK MS C++ 2017 TESTS 8 31 307200
210096365 skimono C June 18, 2023, 12:07 p.m. OK MS C++ 2017 TESTS 8 31 409600
210101687 _vanger_ C June 18, 2023, 1:06 p.m. OK MS C++ 2017 TESTS 8 46 307200
210077454 _vanger_ C June 18, 2023, 9:50 a.m. OK MS C++ 2017 TESTS 8 61 409600
210079170 AbdulRahmanLuai C June 18, 2023, 9:55 a.m. OK PyPy 3 TESTS 8 202 8601600
210075091 wizardrabbit C June 18, 2023, 9:42 a.m. OK PyPy 3 TESTS 8 264 9318400
210096624 jvatsal0709 C June 18, 2023, 12:10 p.m. OK PyPy 3 TESTS 8 421 8704000
210094040 varahamihira_ C June 18, 2023, 11:43 a.m. OK PyPy 3 TESTS 8 436 8396800
210074972 spacetune C June 18, 2023, 9:42 a.m. OK PyPy 3 TESTS 8 436 9830400
210074876 seawon0808 C June 18, 2023, 9:42 a.m. OK PyPy 3 TESTS 8 451 9728000
210093299 dopdop C June 18, 2023, 11:36 a.m. OK PyPy 3 TESTS 8 483 9216000
210078969 zronghui C June 18, 2023, 9:54 a.m. OK PyPy 3 TESTS 8 483 9625600
210075068 himanshuyadavhere C June 18, 2023, 9:42 a.m. OK PyPy 3 TESTS 8 483 9830400
210093755 shadowfieend C June 18, 2023, 11:40 a.m. OK PyPy 3 TESTS 8 686 10342400
210109787 Div2003 C June 18, 2023, 2:33 p.m. OK PyPy 3-64 TESTS 8 109 9113600
210200387 vedantmishra69 C June 19, 2023, 4:10 a.m. OK PyPy 3-64 TESTS 8 124 8806400
210075137 arun.bh C June 18, 2023, 9:43 a.m. OK PyPy 3-64 TESTS 8 124 9318400
210084725 poornaTheja C June 18, 2023, 10:21 a.m. OK PyPy 3-64 TESTS 8 155 9932800
210074113 Solaca C June 18, 2023, 9:39 a.m. OK PyPy 3-64 TESTS 8 171 9625600
210074021 sixthcore C June 18, 2023, 9:39 a.m. OK PyPy 3-64 TESTS 8 171 22016000
210076963 OmarMoBadr C June 18, 2023, 9:48 a.m. OK PyPy 3-64 TESTS 8 186 11468800
210086382 Hisoka-TheMagician C June 18, 2023, 10:32 a.m. OK PyPy 3-64 TESTS 8 187 10649600
210104050 pennymagic156 C June 18, 2023, 1:35 p.m. OK PyPy 3-64 TESTS 8 202 9523200
210178028 nguyenchicuong C June 18, 2023, 6:55 p.m. OK PyPy 3-64 TESTS 8 202 13414400
210104199 pennymagic156 C June 18, 2023, 1:37 p.m. OK Python 3 TESTS 8 93 2150400
210119598 margaery C June 18, 2023, 2:47 p.m. OK Python 3 TESTS 8 93 3276800
210098616 vadim-_- C June 18, 2023, 12:31 p.m. OK Python 3 TESTS 8 108 409600
210095454 okay4869 C June 18, 2023, 11:58 a.m. OK Python 3 TESTS 8 109 512000
210107778 yulix C June 18, 2023, 2:14 p.m. OK Python 3 TESTS 8 109 2457600
210203897 leonardo.liu.ziyang C June 19, 2023, 5:22 a.m. OK Python 3 TESTS 8 124 409600
210188497 vadim.golubtsov C June 18, 2023, 10:53 p.m. OK Python 3 TESTS 8 124 409600
210086736 kssergey C June 18, 2023, 10:34 a.m. OK Python 3 TESTS 8 124 409600
210086455 sonusahu__ C June 18, 2023, 10:32 a.m. OK Python 3 TESTS 8 124 409600
210081594 pravallika_pravs C June 18, 2023, 10:02 a.m. OK Python 3 TESTS 8 124 409600
210078609 2000031578_Ankith C June 18, 2023, 9:53 a.m. OK Ruby 3 TESTS 8 296 10956800
210077728 riverbl C June 18, 2023, 9:50 a.m. OK Rust 2021 TESTS 8 77 1638400

remove filters

Back to search problems