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 |
---|---|---|---|---|---|---|
1789 | Codeforces Round 853 (Div. 2) | FINISHED | False | 7200 | 54488399 | Feb. 25, 2023, 2:20 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 16277 ) | B | Serval and Inversion Magic | PROGRAMMING | implementation strings |
B"Serval has a string s that only consists of 0 and 1 of length n . The i -th character of s is denoted as s_i , where 1 <= q i <= q n . Serval can perform the following operation called Inversion Magic on the string s : For example, let s be 010100 and the segment [2,5] is chosen. The string s will be 001010 after performing the Inversion Magic. Serval wants to make s a palindrome after performing Inversion Magic exactly once. Help him to determine whether it is possible. A string is a palindrome iff it reads the same backwards as forwards. For example, 010010 is a palindrome but 10111 is not. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= q t <= q 10^4 ). The description of the test cases follows. The first line of each test case contains a single integer n ( 2 <= q n <= q 10^5 ) -- the length of string s . The second line of each test case contains a binary string s of length n . Only characters 0 and 1 can appear in s . It's guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, print Yes if s can be a palindrome after performing Inversion Magic exactly once, and print No if not. You can output Yes and No in any case (for example, strings yEs, yes, Yes and YES will be recognized as a positive response). In the first test case, Serval can perform Inversion Magic on the segment [1,4] . The string s will be 0110 after the magic. In the second test case, Serval can perform Inversion Magic on the segment [1,3] . The string s will be 01110 after the magic. In the third test case, Serval can't make s a palindrome by performing Inversion Magic exactly once. "... |
Codeforces Round #853 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
194960221 | gilevay | B | Feb. 25, 2023, 3:41 p.m. | OK | C# 10 | TESTS | 15 | 61 | 819200 | ||
194964939 | ansergeyg | B | Feb. 25, 2023, 3:58 p.m. | OK | C# 10 | TESTS | 15 | 62 | 3276800 | ||
194962846 | kamyar_2002 | B | Feb. 25, 2023, 3:50 p.m. | OK | C# 8 | TESTS | 15 | 108 | 2048000 | ||
194963382 | OldMachine | B | Feb. 25, 2023, 3:52 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 102400 | ||
194965186 | LR_Wahid | B | Feb. 25, 2023, 3:59 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 102400 | ||
194967341 | RongDuJiKsp | B | Feb. 25, 2023, 4:07 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 102400 | ||
194974544 | iffatul_anon | B | Feb. 25, 2023, 5:04 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 102400 | ||
195015753 | Smallorange | B | Feb. 26, 2023, 5:28 a.m. | OK | GNU C11 | TESTS | 15 | 46 | 102400 | ||
194957614 | Karim_Mostafa_FOE | B | Feb. 25, 2023, 3:33 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 102400 | ||
194977855 | rushil21_ | B | Feb. 25, 2023, 5:29 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 204800 | ||
194987180 | rushil21_ | B | Feb. 25, 2023, 7:06 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 8089600 | ||
194987456 | rushil21_ | B | Feb. 25, 2023, 7:09 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 9011200 | ||
194959787 | KP_KP | B | Feb. 25, 2023, 3:39 p.m. | OK | GNU C11 | TESTS | 15 | 61 | 102400 | ||
195005947 | whdywjd | B | Feb. 26, 2023, 1:40 a.m. | OK | GNU C++14 | TESTS | 15 | 0 | 307200 | ||
194956638 | Chtholly_Nephren | B | Feb. 25, 2023, 3:29 p.m. | OK | GNU C++14 | TESTS | 15 | 15 | 102400 | ||
194957392 | zhangshangzhio | B | Feb. 25, 2023, 3:32 p.m. | OK | GNU C++14 | TESTS | 15 | 15 | 102400 | ||
195006286 | ztlh | B | Feb. 26, 2023, 1:50 a.m. | OK | GNU C++14 | TESTS | 15 | 15 | 102400 | ||
194987351 | ashu9935 | B | Feb. 25, 2023, 7:08 p.m. | OK | GNU C++14 | TESTS | 15 | 15 | 204800 | ||
195002507 | HY_lqs | B | Feb. 25, 2023, 11:45 p.m. | OK | GNU C++14 | TESTS | 15 | 15 | 204800 | ||
195006837 | clm_123 | B | Feb. 26, 2023, 2:03 a.m. | OK | GNU C++14 | TESTS | 15 | 15 | 204800 | ||
195007479 | xigualang | B | Feb. 26, 2023, 2:19 a.m. | OK | GNU C++14 | TESTS | 15 | 15 | 204800 | ||
195008843 | include_BM | B | Feb. 26, 2023, 2:53 a.m. | OK | GNU C++14 | TESTS | 15 | 15 | 204800 | ||
195008643 | sutur | B | Feb. 26, 2023, 2:48 a.m. | OK | GNU C++14 | TESTS | 15 | 15 | 204800 | ||
194959566 | Victor_Luis123 | B | Feb. 25, 2023, 3:38 p.m. | OK | GNU C++17 | TESTS | 15 | 15 | 102400 | ||
194979568 | .av | B | Feb. 25, 2023, 5:45 p.m. | OK | GNU C++17 | TESTS | 15 | 15 | 102400 | ||
194977829 | eswar_13 | B | Feb. 25, 2023, 5:28 p.m. | OK | GNU C++17 | TESTS | 15 | 15 | 102400 | ||
194958965 | hnust_liuyang | B | Feb. 25, 2023, 3:36 p.m. | OK | GNU C++17 | TESTS | 15 | 15 | 102400 | ||
195004996 | Blueberry_1 | B | Feb. 26, 2023, 1:12 a.m. | OK | GNU C++17 | TESTS | 15 | 15 | 204800 | ||
195007217 | Qw1ko | B | Feb. 26, 2023, 2:14 a.m. | OK | GNU C++17 | TESTS | 15 | 15 | 204800 | ||
194987108 | abdalrahem.r.dado | B | Feb. 25, 2023, 7:05 p.m. | OK | GNU C++17 | TESTS | 15 | 15 | 307200 | ||
195006948 | microne_mzx | B | Feb. 26, 2023, 2:07 a.m. | OK | GNU C++17 | TESTS | 15 | 15 | 307200 | ||
194992459 | Nada_A7med | B | Feb. 25, 2023, 8:18 p.m. | OK | GNU C++17 | TESTS | 15 | 15 | 307200 | ||
195009602 | sdnu_dawn | B | Feb. 26, 2023, 3:15 a.m. | OK | GNU C++17 | TESTS | 15 | 15 | 307200 | ||
195008324 | _JSYX_ | B | Feb. 26, 2023, 2:40 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 307200 | ||
194959692 | aryangoenka26 | B | Feb. 25, 2023, 3:39 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 15 | 307200 | ||
194995827 | enslaved | B | Feb. 25, 2023, 9:16 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 15 | 409600 | ||
195017790 | Uchiha_Itachi25 | B | Feb. 26, 2023, 5:57 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 15 | 409600 | ||
195010260 | stop | B | Feb. 26, 2023, 3:33 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 15 | 409600 | ||
195007880 | OTTFF | B | Feb. 26, 2023, 2:29 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 15 | 409600 | ||
195005282 | xioachou | B | Feb. 26, 2023, 1:21 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 15 | 409600 | ||
195002806 | PurpleCrayon | B | Feb. 25, 2023, 11:55 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 15 | 409600 | ||
194989264 | Mhamad_aboaljood | B | Feb. 25, 2023, 7:33 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 15 | 409600 | ||
194988544 | yayyay | B | Feb. 25, 2023, 7:23 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 15 | 409600 | ||
194989334 | OMAR_TAHA | B | Feb. 25, 2023, 7:34 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 409600 | ||
194991693 | HitmanX97 | B | Feb. 25, 2023, 8:06 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 409600 | ||
194996634 | DjangoParpar | B | Feb. 25, 2023, 9:29 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 409600 | ||
195002424 | barkaat | B | Feb. 25, 2023, 11:42 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 409600 | ||
195004464 | jimi04 | B | Feb. 26, 2023, 12:55 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 409600 | ||
195006697 | tsk101 | B | Feb. 26, 2023, 2 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 409600 | ||
195006750 | mrsuns | B | Feb. 26, 2023, 2:01 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 409600 | ||
195009251 | buns_out | B | Feb. 26, 2023, 3:05 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 409600 | ||
195014617 | sahadat_034 | B | Feb. 26, 2023, 5:10 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 409600 | ||
195017984 | qianchen06 | B | Feb. 26, 2023, 6 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 409600 | ||
194984424 | _samit_ | B | Feb. 25, 2023, 6:34 p.m. | OK | Go | TESTS | 15 | 31 | 1536000 | ||
194966984 | sobii | B | Feb. 25, 2023, 4:05 p.m. | OK | Go | TESTS | 15 | 62 | 1433600 | ||
194988702 | Yash9890 | B | Feb. 25, 2023, 7:26 p.m. | OK | Java 11 | TESTS | 15 | 186 | 0 | ||
194979063 | Extradict | B | Feb. 25, 2023, 5:40 p.m. | OK | Java 11 | TESTS | 15 | 187 | 0 | ||
194957647 | _CHEEMS_ | B | Feb. 25, 2023, 3:33 p.m. | OK | Java 11 | TESTS | 15 | 187 | 0 | ||
194968753 | ggghg | B | Feb. 25, 2023, 4:13 p.m. | OK | Java 11 | TESTS | 15 | 202 | 0 | ||
194961671 | rishisingh7012 | B | Feb. 25, 2023, 3:46 p.m. | OK | Java 11 | TESTS | 15 | 233 | 0 | ||
194973647 | SAY_NO_TO_EDITORIAL | B | Feb. 25, 2023, 4:59 p.m. | OK | Java 11 | TESTS | 15 | 264 | 0 | ||
194984123 | yudi23 | B | Feb. 25, 2023, 6:31 p.m. | OK | Java 11 | TESTS | 15 | 265 | 0 | ||
195005192 | viral_124 | B | Feb. 26, 2023, 1:18 a.m. | OK | Java 11 | TESTS | 15 | 280 | 0 | ||
194968460 | Siddharth_Singh_here | B | Feb. 25, 2023, 4:12 p.m. | OK | Java 11 | TESTS | 15 | 280 | 0 | ||
194980787 | Hassan_Ali_ | B | Feb. 25, 2023, 5:56 p.m. | OK | Java 11 | TESTS | 15 | 295 | 0 | ||
194963215 | SugoiTurtle | B | Feb. 25, 2023, 3:51 p.m. | OK | Java 17 | TESTS | 15 | 171 | 512000 | ||
194974649 | Ayham2222 | B | Feb. 25, 2023, 5:05 p.m. | OK | Java 17 | TESTS | 15 | 187 | 307200 | ||
194960571 | andry57 | B | Feb. 25, 2023, 3:42 p.m. | OK | Java 17 | TESTS | 15 | 187 | 307200 | ||
194960222 | asetix | B | Feb. 25, 2023, 3:41 p.m. | OK | Java 17 | TESTS | 15 | 187 | 307200 | ||
194957958 | anikethend1234 | B | Feb. 25, 2023, 3:34 p.m. | OK | Java 17 | TESTS | 15 | 202 | 0 | ||
195016411 | vikash_45 | B | Feb. 26, 2023, 5:39 a.m. | OK | Java 17 | TESTS | 15 | 202 | 409600 | ||
194995198 | luci9868 | B | Feb. 25, 2023, 9:06 p.m. | OK | Java 17 | TESTS | 15 | 202 | 409600 | ||
194978419 | Abood19 | B | Feb. 25, 2023, 5:34 p.m. | OK | Java 17 | TESTS | 15 | 217 | 409600 | ||
194991957 | MaximSucks | B | Feb. 25, 2023, 8:10 p.m. | OK | Java 17 | TESTS | 15 | 217 | 512000 | ||
194961376 | anupam_das_2011 | B | Feb. 25, 2023, 3:45 p.m. | OK | Java 17 | TESTS | 15 | 218 | 102400 | ||
195001408 | yadavDipesh | B | Feb. 25, 2023, 11:11 p.m. | OK | Java 8 | TESTS | 15 | 108 | 0 | ||
195011092 | formidablechief_27 | B | Feb. 26, 2023, 3:54 a.m. | OK | Java 8 | TESTS | 15 | 109 | 0 | ||
194979612 | vaibhav_1710 | B | Feb. 25, 2023, 5:45 p.m. | OK | Java 8 | TESTS | 15 | 109 | 0 | ||
194977524 | 5ald | B | Feb. 25, 2023, 5:25 p.m. | OK | Java 8 | TESTS | 15 | 109 | 0 | ||
194966029 | clcwcxfwf | B | Feb. 25, 2023, 4:02 p.m. | OK | Java 8 | TESTS | 15 | 109 | 0 | ||
194957276 | outofzone | B | Feb. 25, 2023, 3:31 p.m. | OK | Java 8 | TESTS | 15 | 109 | 0 | ||
195007040 | one_line | B | Feb. 26, 2023, 2:09 a.m. | OK | Java 8 | TESTS | 15 | 124 | 0 | ||
194977129 | soyebsarkar | B | Feb. 25, 2023, 5:22 p.m. | OK | Java 8 | TESTS | 15 | 124 | 0 | ||
194973523 | ankit_0207 | B | Feb. 25, 2023, 4:59 p.m. | OK | Java 8 | TESTS | 15 | 124 | 0 | ||
194958907 | priyaroy3370 | B | Feb. 25, 2023, 3:36 p.m. | OK | Java 8 | TESTS | 15 | 124 | 0 | ||
194977019 | Krantzy | B | Feb. 25, 2023, 5:21 p.m. | OK | Kotlin 1.7 | TESTS | 15 | 452 | 5427200 | ||
194961535 | yixi | B | Feb. 25, 2023, 3:45 p.m. | OK | MS C++ 2017 | TESTS | 15 | 15 | 307200 | ||
194963495 | AC1DLOVEEE | B | Feb. 25, 2023, 3:52 p.m. | OK | MS C++ 2017 | TESTS | 15 | 30 | 307200 | ||
194975982 | aadrito | B | Feb. 25, 2023, 5:13 p.m. | OK | MS C++ 2017 | TESTS | 15 | 31 | 307200 | ||
195004053 | hua_yi_jiu | B | Feb. 26, 2023, 12:40 a.m. | OK | MS C++ 2017 | TESTS | 15 | 46 | 307200 | ||
194966212 | Liverpopl11121 | B | Feb. 25, 2023, 4:02 p.m. | OK | MS C++ 2017 | TESTS | 15 | 46 | 409600 | ||
194969626 | muky | B | Feb. 25, 2023, 4:16 p.m. | OK | MS C++ 2017 | TESTS | 15 | 77 | 204800 | ||
194970848 | jonathan-chen10 | B | Feb. 25, 2023, 4:19 p.m. | OK | Node.js | TESTS | 15 | 187 | 6553600 | ||
194959288 | mdrm | B | Feb. 25, 2023, 3:37 p.m. | OK | PyPy 3 | TESTS | 15 | 171 | 6041600 | ||
195014433 | sohnryang | B | Feb. 26, 2023, 5:07 a.m. | OK | PyPy 3 | TESTS | 15 | 171 | 9216000 | ||
194991251 | dazlersan1 | B | Feb. 25, 2023, 8 p.m. | OK | PyPy 3 | TESTS | 15 | 343 | 7372800 | ||
194985465 | pranavkumar | B | Feb. 25, 2023, 6:45 p.m. | OK | PyPy 3 | TESTS | 15 | 374 | 7577600 | ||
194968397 | Rohan_7503 | B | Feb. 25, 2023, 4:11 p.m. | OK | PyPy 3 | TESTS | 15 | 374 | 8192000 | ||
194957307 | godspeedx | B | Feb. 25, 2023, 3:32 p.m. | OK | PyPy 3 | TESTS | 15 | 389 | 10342400 | ||
194962231 | Snake_Eyes1999 | B | Feb. 25, 2023, 3:48 p.m. | OK | PyPy 3 | TESTS | 15 | 421 | 9318400 | ||
194962740 | Gwin232 | B | Feb. 25, 2023, 3:50 p.m. | OK | PyPy 3 | TESTS | 15 | 436 | 7782400 | ||
194961067 | marti2357 | B | Feb. 25, 2023, 3:44 p.m. | OK | PyPy 3 | TESTS | 15 | 436 | 9318400 | ||
194965659 | heat_007 | B | Feb. 25, 2023, 4 p.m. | OK | PyPy 3 | TESTS | 15 | 436 | 11468800 | ||
195005655 | samchen123 | B | Feb. 26, 2023, 1:31 a.m. | OK | PyPy 3-64 | TESTS | 15 | 77 | 5324800 | ||
194997392 | tlsgusrb314 | B | Feb. 25, 2023, 9:42 p.m. | OK | PyPy 3-64 | TESTS | 15 | 93 | 9011200 | ||
194998087 | kavorka | B | Feb. 25, 2023, 9:55 p.m. | OK | PyPy 3-64 | TESTS | 15 | 93 | 9113600 | ||
194998041 | kavorka | B | Feb. 25, 2023, 9:54 p.m. | OK | PyPy 3-64 | TESTS | 15 | 93 | 9113600 | ||
194997965 | kavorka | B | Feb. 25, 2023, 9:53 p.m. | OK | PyPy 3-64 | TESTS | 15 | 93 | 9113600 | ||
194997950 | kavorka | B | Feb. 25, 2023, 9:52 p.m. | OK | PyPy 3-64 | TESTS | 15 | 93 | 9113600 | ||
194959930 | levinezhou | B | Feb. 25, 2023, 3:40 p.m. | OK | PyPy 3-64 | TESTS | 15 | 108 | 8089600 | ||
194998061 | kavorka | B | Feb. 25, 2023, 9:55 p.m. | OK | PyPy 3-64 | TESTS | 15 | 108 | 9113600 | ||
194998017 | kavorka | B | Feb. 25, 2023, 9:54 p.m. | OK | PyPy 3-64 | TESTS | 15 | 108 | 9113600 | ||
194997983 | kavorka | B | Feb. 25, 2023, 9:53 p.m. | OK | PyPy 3-64 | TESTS | 15 | 108 | 9113600 | ||
194965334 | Roudivich | B | Feb. 25, 2023, 3:59 p.m. | OK | Python 3 | TESTS | 15 | 93 | 614400 | ||
194959559 | nik_enjoy | B | Feb. 25, 2023, 3:38 p.m. | OK | Python 3 | TESTS | 15 | 93 | 921600 | ||
194966599 | eugalt | B | Feb. 25, 2023, 4:04 p.m. | OK | Python 3 | TESTS | 15 | 93 | 1331200 | ||
195007173 | fathorse | B | Feb. 26, 2023, 2:13 a.m. | OK | Python 3 | TESTS | 15 | 108 | 512000 | ||
194963074 | mateusvrs | B | Feb. 25, 2023, 3:51 p.m. | OK | Python 3 | TESTS | 15 | 109 | 716800 | ||
194978398 | arnav31 | B | Feb. 25, 2023, 5:34 p.m. | OK | Python 3 | TESTS | 15 | 124 | 512000 | ||
194981423 | vadim-_- | B | Feb. 25, 2023, 6:02 p.m. | OK | Python 3 | TESTS | 15 | 139 | 512000 | ||
194967523 | pragyan_123 | B | Feb. 25, 2023, 4:08 p.m. | OK | Python 3 | TESTS | 15 | 139 | 512000 | ||
194959432 | kollabhargavre1 | B | Feb. 25, 2023, 3:38 p.m. | OK | Python 3 | TESTS | 15 | 139 | 512000 | ||
194993497 | MasterKali | B | Feb. 25, 2023, 8:35 p.m. | OK | Python 3 | TESTS | 15 | 140 | 512000 |
Back to search problems