Codeforces Round 872 (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
1825 Codeforces Round 872 (Div. 2) FINISHED False 7200 53718863 May 8, 2023, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19875 ) A LuoTianyi and the Palindrome String PROGRAMMING greedy strings 800

B'LuoTianyi gives you a palindrome ^{ dagger} string s , and she wants you to find out the length of the longest non-empty subsequence ^{ ddagger} of s which is not a palindrome string. If there is no such subsequence, output -1 instead. ^{ dagger} A palindrome is a string that reads the same backward as forward. For example, strings "z", "aaa", "aba", "abccba" are palindromes, but strings "codeforces", "reality", "ab" are not. ^{ ddagger} A string a is a subsequence of a string b if a can be obtained from b by deletion of several (possibly, zero or all) characters from b . For example, strings "a", "aaa", "bab" are subsequences of string "abaab", but strings "codeforces", "bbb", "h" are not. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The description of test cases follows. The first and the only line of each test case contains a single string s ( 1 <= |s| <= 50 ) consisting of lowercase English letters -- the string that LuoTianyi gives you. It 's guaranteed that s is a palindrome string. For each test case, output a single integer -- the length of the longest non-empty subsequence which is not a palindrome string. If there is no such subsequence, output -1 . In the first test case, "abcaba" is a subsequence of "abacaba" as we can delete the third letter of "abacaba" to get "abcaba", and "abcaba" is not a palindrome string. We can prove that "abcaba" is an example of the longest subsequences of "abacaba" that isn 't palindrome, so that the answer is 6 . In the second test case, we can only get "a" and "aa", but they are all palindrome strings, so the answer is -1 . '...

Tutorials

CodeForces Round 872(Div. 1&2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
205293044 QwertyPi A May 10, 2023, 6:05 a.m. OK C# 10 TESTS 10 46 102400 800
205463187 Mond1c A May 11, 2023, 5:45 p.m. OK C# 10 TESTS 10 62 102400 800
205197387 bluemegane A May 9, 2023, 8:08 a.m. OK C# 8 TESTS 10 202 1228800 800
205290676 Taj025 A May 10, 2023, 5:33 a.m. OK C# 8 TESTS 10 202 3072000 800
205442639 jafrul_sadik A May 11, 2023, 2:29 p.m. OK Clang++17 Diagnostics TESTS 10 46 0 800
205194356 ForKirie A May 9, 2023, 7:28 a.m. OK Clang++17 Diagnostics TESTS 10 46 0 800
205195041 ForKirie A May 9, 2023, 7:38 a.m. OK Clang++17 Diagnostics TESTS 10 46 0 800
205234405 jarifulovi A May 9, 2023, 2:02 p.m. OK Clang++17 Diagnostics TESTS 10 46 0 800
205323467 ACML A May 10, 2023, 12:04 p.m. OK Clang++17 Diagnostics TESTS 10 46 0 800
205817101 sofiazy A May 14, 2023, 10:02 a.m. OK Clang++17 Diagnostics TESTS 10 93 2662400 800
205270402 Kumar_KKKKKK A May 9, 2023, 8:46 p.m. OK Clang++20 Diagnostics TESTS 10 31 0 800
205267735 truthtruth888888 A May 9, 2023, 7:57 p.m. OK Clang++20 Diagnostics TESTS 10 31 0 800
205735054 aacxx A May 13, 2023, 3:21 p.m. OK Clang++20 Diagnostics TESTS 10 46 0 800
205278374 decade_66 A May 10, 2023, 12:58 a.m. OK Clang++20 Diagnostics TESTS 10 46 0 800
205238033 ysail A May 9, 2023, 2:34 p.m. OK Clang++20 Diagnostics TESTS 10 46 0 800
205226941 estars A May 9, 2023, 12:58 p.m. OK Clang++20 Diagnostics TESTS 10 46 0 800
205221197 bkifhr7 A May 9, 2023, 12:11 p.m. OK Clang++20 Diagnostics TESTS 10 46 0 800
205771825 JamesTheNotLamez A May 13, 2023, 11:21 p.m. OK Clang++20 Diagnostics TESTS 10 62 0 800
205807737 mtwhitecamel A May 14, 2023, 8:42 a.m. OK GNU C11 TESTS 10 15 0 800
205180935 ki.021 A May 9, 2023, 3:48 a.m. OK GNU C11 TESTS 10 15 0 800
205180734 Dakkar_7 A May 9, 2023, 3:43 a.m. OK GNU C11 TESTS 10 15 0 800
205232758 666long A May 9, 2023, 1:48 p.m. OK GNU C11 TESTS 10 15 0 800
205367830 nusratjahanlopa02 A May 10, 2023, 8:05 p.m. OK GNU C11 TESTS 10 15 0 800
205473761 apocalypto_ A May 11, 2023, 7:48 p.m. OK GNU C11 TESTS 10 15 0 800
205516330 nayonmondol18 A May 12, 2023, 8:53 a.m. OK GNU C11 TESTS 10 15 0 800
206223526 astronom1cal A May 17, 2023, 2:35 p.m. OK GNU C11 TESTS 10 15 0 800
206532621 Tasnim_jarin A May 19, 2023, 4:25 p.m. OK GNU C11 TESTS 10 31 0 800
206560147 MD.Murad A May 19, 2023, 6:36 p.m. OK GNU C11 TESTS 10 31 0 800
205293930 Ling_Lover A May 10, 2023, 6:17 a.m. OK GNU C++14 TESTS 10 0 0 800
205304068 zdl777 A May 10, 2023, 8:24 a.m. OK GNU C++14 TESTS 10 0 0 800
205317329 niyueshu A May 10, 2023, 11:01 a.m. OK GNU C++14 TESTS 10 0 0 800
205319810 BlackSnake A May 10, 2023, 11:28 a.m. OK GNU C++14 TESTS 10 0 0 800
205334890 FishAndCat A May 10, 2023, 1:48 p.m. OK GNU C++14 TESTS 10 0 0 800
205434246 lmn207 A May 11, 2023, 1:18 p.m. OK GNU C++14 TESTS 10 0 0 800
205654815 dasher2238 A May 12, 2023, 11:47 p.m. OK GNU C++14 TESTS 10 0 0 800
205725836 shattershade A May 13, 2023, 1:48 p.m. OK GNU C++14 TESTS 10 0 0 800
205738119 everyday48 A May 13, 2023, 3:49 p.m. OK GNU C++14 TESTS 10 0 0 800
205957561 T-S_2392 A May 15, 2023, 8:32 a.m. OK GNU C++14 TESTS 10 0 0 800
205379360 AkaiLemon A May 11, 2023, 1:06 a.m. OK GNU C++17 TESTS 10 0 0 800
206438701 linmanba A May 19, 2023, 11:20 a.m. OK GNU C++17 TESTS 10 0 0 800
205994252 _Rudeus_ A May 15, 2023, 2:08 p.m. OK GNU C++17 TESTS 10 0 0 800
205734095 cftryharder A May 13, 2023, 3:11 p.m. OK GNU C++17 TESTS 10 0 0 800
205662584 zgw A May 13, 2023, 3:04 a.m. OK GNU C++17 TESTS 10 0 0 800
205510597 CPDISCIPLINE A May 12, 2023, 7:46 a.m. OK GNU C++17 TESTS 10 0 0 800
205442039 deepkarm A May 11, 2023, 2:24 p.m. OK GNU C++17 TESTS 10 0 0 800
205374060 Zhtluo A May 10, 2023, 10:12 p.m. OK GNU C++17 TESTS 10 0 0 800
205362057 hegazy23 A May 10, 2023, 6:37 p.m. OK GNU C++17 TESTS 10 0 0 800
205321360 MisQo A May 10, 2023, 11:44 a.m. OK GNU C++17 TESTS 10 0 0 800
205300407 tarjen A May 10, 2023, 7:38 a.m. OK GNU C++17 (64) TESTS 10 0 0 800
205308766 jcccc A May 10, 2023, 9:20 a.m. OK GNU C++17 (64) TESTS 10 0 0 800
205328711 dazai_chan A May 10, 2023, 12:54 p.m. OK GNU C++17 (64) TESTS 10 0 0 800
205331642 ShikiComder A May 10, 2023, 1:20 p.m. OK GNU C++17 (64) TESTS 10 0 0 800
205382639 unrk_RE A May 11, 2023, 2:38 a.m. OK GNU C++17 (64) TESTS 10 0 0 800
205517018 darishkhan A May 12, 2023, 9:01 a.m. OK GNU C++17 (64) TESTS 10 0 0 800
205749002 piyushgupta4399 A May 13, 2023, 5:37 p.m. OK GNU C++17 (64) TESTS 10 0 0 800
206337401 SyruLoveNewTechnology A May 18, 2023, 12:12 p.m. OK GNU C++17 (64) TESTS 10 0 0 800
206408574 OTTFF A May 19, 2023, 5:59 a.m. OK GNU C++17 (64) TESTS 10 0 0 800
206563536 code_ninja_123 A May 19, 2023, 7:19 p.m. OK GNU C++17 (64) TESTS 10 0 0 800
206439851 Khaaaleed_5 A May 19, 2023, 11:33 a.m. OK GNU C++20 (64) TESTS 10 0 0 800
206438553 hy0uka A May 19, 2023, 11:19 a.m. OK GNU C++20 (64) TESTS 10 0 0 800
206413025 lilyuan A May 19, 2023, 6:55 a.m. OK GNU C++20 (64) TESTS 10 0 0 800
206385055 Moamen_Ebrahim A May 18, 2023, 8:25 p.m. OK GNU C++20 (64) TESTS 10 0 0 800
206377425 s_u_h A May 18, 2023, 6:36 p.m. OK GNU C++20 (64) TESTS 10 0 0 800
206376856 practicecode2place A May 18, 2023, 6:29 p.m. OK GNU C++20 (64) TESTS 10 0 0 800
206376663 aks_ A May 18, 2023, 6:28 p.m. OK GNU C++20 (64) TESTS 10 0 0 800
206369383 Kavya2719 A May 18, 2023, 5:15 p.m. OK GNU C++20 (64) TESTS 10 0 0 800
206361968 Tejas___K A May 18, 2023, 3:58 p.m. OK GNU C++20 (64) TESTS 10 0 0 800
206359961 voyager_08 A May 18, 2023, 3:38 p.m. OK GNU C++20 (64) TESTS 10 0 0 800
205214121 katomasao A May 9, 2023, 11:05 a.m. OK Haskell TESTS 10 15 0 800
205252098 programmer_teddy A May 9, 2023, 4:40 p.m. OK Java 11 TESTS 10 171 0 800
206044499 hemanth746 A May 16, 2023, 4:12 a.m. OK Java 11 TESTS 10 171 0 800
205691314 amanpatel23 A May 13, 2023, 8:24 a.m. OK Java 11 TESTS 10 171 0 800
205466626 TheGoldenSmileOfTheNile A May 11, 2023, 6:18 p.m. OK Java 11 TESTS 10 171 0 800
205444566 keenzo A May 11, 2023, 2:44 p.m. OK Java 11 TESTS 10 171 0 800
205218388 gaju_01 A May 9, 2023, 11:46 a.m. OK Java 11 TESTS 10 171 0 800
205210324 yelanyanyu A May 9, 2023, 10:25 a.m. OK Java 11 TESTS 10 171 0 800
205205377 banurr A May 9, 2023, 9:33 a.m. OK Java 11 TESTS 10 171 0 800
205280072 NithinBharathi A May 10, 2023, 1:55 a.m. OK Java 11 TESTS 10 186 0 800
206253635 tonyn10 A May 17, 2023, 5:02 p.m. OK Java 11 TESTS 10 187 0 800
206189244 dracarys_1105 A May 17, 2023, 9:08 a.m. OK Java 17 TESTS 10 171 512000 800
206097551 sanath.r A May 16, 2023, 2:08 p.m. OK Java 17 TESTS 10 186 0 800
206135942 Vrutik_2809 A May 16, 2023, 4:55 p.m. OK Java 17 TESTS 10 186 307200 800
205321041 SuprHUlk A May 10, 2023, 11:40 a.m. OK Java 17 TESTS 10 186 512000 800
205188558 humwawe A May 9, 2023, 6:09 a.m. OK Java 17 TESTS 10 187 409600 800
205485733 aruniscoding A May 12, 2023, 12:18 a.m. OK Java 17 TESTS 10 187 614400 800
205197731 nigamabhai03 A May 9, 2023, 8:12 a.m. OK Java 17 TESTS 10 202 0 800
205252434 Vengeance24032003 A May 9, 2023, 4:44 p.m. OK Java 17 TESTS 10 202 102400 800
205208213 IceWolf898 A May 9, 2023, 10:02 a.m. OK Java 17 TESTS 10 202 307200 800
205189505 aishwarykesarwani A May 9, 2023, 6:24 a.m. OK Java 17 TESTS 10 202 307200 800
205459463 T_PAVAN_NAGARAJU A May 11, 2023, 5:08 p.m. OK Java 8 TESTS 10 93 0 800
205419629 harsh_1806 A May 11, 2023, 11:08 a.m. OK Java 8 TESTS 10 93 0 800
205211866 sarthakjoleya A May 9, 2023, 10:42 a.m. OK Java 8 TESTS 10 93 0 800
205293877 lcheeme1 A May 10, 2023, 6:17 a.m. OK Java 8 TESTS 10 108 0 800
206044346 madhav2800 A May 16, 2023, 4:09 a.m. OK Java 8 TESTS 10 108 0 800
205347242 P1011 A May 10, 2023, 3:46 p.m. OK Java 8 TESTS 10 108 0 800
205309179 danielaggarwal A May 10, 2023, 9:24 a.m. OK Java 8 TESTS 10 109 0 800
205545704 Parth_Pandey A May 12, 2023, 2:07 p.m. OK Java 8 TESTS 10 124 0 800
205345856 tejasS-27 A May 10, 2023, 3:32 p.m. OK Java 8 TESTS 10 124 0 800
205934115 Camellia- A May 15, 2023, 2:28 a.m. OK Java 8 TESTS 10 124 0 800
206227859 sanaz A May 17, 2023, 3:21 p.m. OK JavaScript TESTS 10 62 2048000 800
205408276 eneskayiklik A May 11, 2023, 9:09 a.m. OK Kotlin 1.7 TESTS 10 311 11161600 800
205417254 SlavaG A May 11, 2023, 10:43 a.m. OK Kotlin 1.7 TESTS 10 389 5324800 800
205218267 Mhmd_Bakr A May 9, 2023, 11:45 a.m. OK Mono C# TESTS 10 92 307200 800
205220669 Dick007 A May 9, 2023, 12:06 p.m. OK MS C++ 2017 TESTS 10 15 0 800
205256758 _2dvector A May 9, 2023, 5:30 p.m. OK MS C++ 2017 TESTS 10 15 0 800
205179468 ShlumBerg A May 9, 2023, 3:16 a.m. OK MS C++ 2017 TESTS 10 15 0 800
205327282 i_Xer A May 10, 2023, 12:40 p.m. OK MS C++ 2017 TESTS 10 31 0 800
205254501 nirbhaysora A May 9, 2023, 5:06 p.m. OK MS C++ 2017 TESTS 10 31 0 800
206280447 Gadi A May 17, 2023, 8:45 p.m. OK MS C++ 2017 TESTS 10 31 0 800
205186578 sultanmyrza A May 9, 2023, 5:38 a.m. OK Node.js TESTS 10 124 2457600 800
205370684 Darooha A May 10, 2023, 8:53 p.m. OK Ocaml TESTS 10 15 0 800
205346836 jvatsal0709 A May 10, 2023, 3:42 p.m. OK PyPy 3 TESTS 10 93 1536000 800
206319948 soudhamini_2000031088 A May 18, 2023, 9:26 a.m. OK PyPy 3 TESTS 10 108 1945600 800
205500191 Ysb04 A May 12, 2023, 5:29 a.m. OK PyPy 3 TESTS 10 109 2048000 800
205938584 MHAII A May 15, 2023, 3:59 a.m. OK PyPy 3 TESTS 10 124 2764800 800
205903041 momenelmesady4803 A May 14, 2023, 4:55 p.m. OK PyPy 3 TESTS 10 124 2764800 800
205425972 VnPower A May 11, 2023, 12:07 p.m. OK PyPy 3 TESTS 10 124 2764800 800
205206827 Yashbanna A May 9, 2023, 9:47 a.m. OK PyPy 3 TESTS 10 124 2764800 800
205338964 arpan.parikh A May 10, 2023, 2:24 p.m. OK PyPy 3 TESTS 10 124 67379200 800
206027441 ipip A May 15, 2023, 8:19 p.m. OK PyPy 3 TESTS 10 140 2764800 800
205542744 SlayerOfShit A May 12, 2023, 1:38 p.m. OK PyPy 3 TESTS 10 140 2764800 800
205260810 Marco_Lau A May 9, 2023, 6:14 p.m. OK PyPy 3-64 TESTS 10 62 1740800 800
205278551 layzer A May 10, 2023, 1:04 a.m. OK PyPy 3-64 TESTS 10 62 1843200 800
205971714 Karthik1106 A May 15, 2023, 11:09 a.m. OK PyPy 3-64 TESTS 10 62 1945600 800
205940509 neerajam A May 15, 2023, 4:34 a.m. OK PyPy 3-64 TESTS 10 62 1945600 800
205265258 titia A May 9, 2023, 7:14 p.m. OK PyPy 3-64 TESTS 10 77 1740800 800
205701335 only_noob A May 13, 2023, 9:49 a.m. OK PyPy 3-64 TESTS 10 77 1843200 800
205472516 Quick-One A May 11, 2023, 7:30 p.m. OK PyPy 3-64 TESTS 10 77 1843200 800
205374445 s945958 A May 10, 2023, 10:25 p.m. OK PyPy 3-64 TESTS 10 77 1843200 800
205255702 damya A May 9, 2023, 5:19 p.m. OK PyPy 3-64 TESTS 10 77 1843200 800
206323896 2000031264 A May 18, 2023, 10:06 a.m. OK PyPy 3-64 TESTS 10 77 1945600 800
205530199 xuyanshi1999 A May 12, 2023, 11:41 a.m. OK Python 3 TESTS 10 30 102400 800
206577709 bkifhr6 A May 20, 2023, 1:02 a.m. OK Python 3 TESTS 10 30 307200 800
206402927 NathanaelR A May 19, 2023, 4:28 a.m. OK Python 3 TESTS 10 31 0 800
205790426 mazsolamacko A May 14, 2023, 6:12 a.m. OK Python 3 TESTS 10 31 0 800
205645084 p0ff A May 12, 2023, 8:20 p.m. OK Python 3 TESTS 10 31 0 800
205535111 ameysh123 A May 12, 2023, 12:31 p.m. OK Python 3 TESTS 10 31 0 800
205505606 not_abhiram A May 12, 2023, 6:42 a.m. OK Python 3 TESTS 10 31 0 800
205292594 isPritchin A May 10, 2023, 5:59 a.m. OK Python 3 TESTS 10 31 0 800
205229263 Asfaqur_ARRB A May 9, 2023, 1:18 p.m. OK Python 3 TESTS 10 31 0 800
206018758 sridharsiddi A May 15, 2023, 6:18 p.m. OK Python 3 TESTS 10 31 102400 800
205183672 0x81 A May 9, 2023, 4:46 a.m. OK Ruby 3 TESTS 10 249 102400 800
205273277 kost A May 9, 2023, 9:55 p.m. OK Rust 2021 TESTS 10 15 0 800
205197818 ilyshana A May 9, 2023, 8:13 a.m. OK Rust 2021 TESTS 10 15 0 800
205187188 kshitij A May 9, 2023, 5:48 a.m. OK Rust 2021 TESTS 10 15 0 800
206080385 robostac A May 16, 2023, 11:35 a.m. OK Rust 2021 TESTS 10 15 409600 800
205193597 namanlp A May 9, 2023, 7:18 a.m. OK Rust 2021 TESTS 10 31 0 800

remove filters

Back to search problems