Codeforces Round 627 (Div. 3)

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
1324 Codeforces Round 627 (Div. 3) FINISHED False 7200 147804899 March 12, 2020, 1:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 28624 ) B Yet Another Palindrome Problem PROGRAMMING strings

B'You are given an array a consisting of n integers. Your task is to determine if a has some subsequence of length at least 3 that is a palindrome. Recall that an array b is called a subsequence of the array a if b can be obtained by removing some (possibly, zero) elements from a (not necessarily consecutive) without changing the order of remaining elements. For example, [2] , [1, 2, 1, 3] and [2, 3] are subsequences of [1, 2, 1, 3] , but [1, 1, 2] and [4] are not. Also, recall that a palindrome is an array that reads the same backward as forward. In other words, the array a of length n is the palindrome if a_i = a_{n - i - 1} for all i from 1 to n . For example, arrays [1234] , [1, 2, 1] , [1, 3, 2, 2, 3, 1] and [10, 100, 10] are palindromes, but arrays [1, 2] and [1, 2, 3, 1] are not. You have to answer t independent test cases. The first line of the input contains one integer t ( 1 <= t <= 100 ) -- the number of test cases. Next 2t lines describe test cases. The first line of the test case contains one integer n ( 3 <= n <= 5000 ) -- the length of a . The second line of the test case contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= n ), where a_i is the i -th element of a . It is guaranteed that the sum of n over all test cases does not exceed 5000 ( sum n <= 5000 ). For each test case, print the answer -- "YES" (without quotes) if a has some subsequence of length at least 3 that is a palindrome and "NO" otherwise. In the first test case of the example, the array a has a subsequence [1, 2, 1] which is a palindrome. In the second test case of the example, the array a has two subsequences of length 3 which are palindromes: [2, 3, 2] and [2, 2, 2] . In the third t'...

Tutorials

Codeforces Round #627 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
73465776 sylxjtu B March 17, 2020, 8:28 a.m. OK Clang++17 Diagnostics TESTS 127 170 0
73735059 yushao.cs05 B March 19, 2020, 5:24 p.m. OK Clang++17 Diagnostics TESTS 127 467 10547200
73707145 wlshih B March 19, 2020, 3:51 p.m. OK Clang++17 Diagnostics TESTS 127 889 100659200
73729506 wlshih B March 19, 2020, 4:53 p.m. OK Clang++17 Diagnostics TESTS 127 998 100659200
73289189 TheHedgehog B March 14, 2020, 9:22 p.m. OK Delphi TESTS 127 46 2867200
73085721 ruban B March 12, 2020, 3:53 p.m. OK Delphi TESTS 127 46 117145600
73803889 pash9021 B March 20, 2020, 2:55 p.m. OK FPC TESTS 127 46 307200
73083760 LaSWeeG B March 12, 2020, 3:33 p.m. OK FPC TESTS 127 46 614400
73130290 quadangvaica B March 13, 2020, 8:52 a.m. OK FPC TESTS 127 46 1024000
73300759 AKWarriors B March 15, 2020, 4:07 a.m. OK FPC TESTS 127 62 0
73498004 vjudge3 B March 17, 2020, 3:06 p.m. OK GNU C11 TESTS 127 31 0
73498430 priyanka5a4 B March 17, 2020, 3:11 p.m. OK GNU C11 TESTS 127 31 0
73504941 vjudge5 B March 17, 2020, 4:27 p.m. OK GNU C11 TESTS 127 31 0
73507864 Bouboulou B March 17, 2020, 5:01 p.m. OK GNU C11 TESTS 127 31 0
73511492 _sam__ B March 17, 2020, 5:42 p.m. OK GNU C11 TESTS 127 31 0
73532617 Nekosan B March 18, 2020, 1:43 a.m. OK GNU C11 TESTS 127 31 0
73585433 Sajjad_fc13 B March 18, 2020, 3:40 p.m. OK GNU C11 TESTS 127 31 0
73655464 Yakma B March 19, 2020, 1:13 p.m. OK GNU C11 TESTS 127 31 0
73823442 suraj_kaple B March 20, 2020, 6:37 p.m. OK GNU C11 TESTS 127 31 0
73823471 prathamesh30 B March 20, 2020, 6:37 p.m. OK GNU C11 TESTS 127 31 0
73657393 saicharanreddy B March 19, 2020, 1:39 p.m. OK GNU C++11 TESTS 127 31 0
73668648 a0976373843 B March 19, 2020, 2:44 p.m. OK GNU C++11 TESTS 127 31 0
73675668 a0976373843 B March 19, 2020, 2:51 p.m. OK GNU C++11 TESTS 127 31 0
73739655 Vikash12 B March 19, 2020, 7:59 p.m. OK GNU C++11 TESTS 127 31 0
73760133 Roopchand B March 20, 2020, 5:02 a.m. OK GNU C++11 TESTS 127 31 0
73769651 rajuIIT B March 20, 2020, 7:22 a.m. OK GNU C++11 TESTS 127 31 0
73776331 luogu_bot5 B March 20, 2020, 8:54 a.m. OK GNU C++11 TESTS 127 31 0
73796852 SkyPooh B March 20, 2020, 1:30 p.m. OK GNU C++11 TESTS 127 31 0
73818270 laksh_kumar B March 20, 2020, 5:49 p.m. OK GNU C++11 TESTS 127 31 0
73822488 xxoooxx345678 B March 20, 2020, 6:27 p.m. OK GNU C++11 TESTS 127 31 0
73779420 dark_horse__ B March 20, 2020, 9:40 a.m. OK GNU C++14 TESTS 127 31 0
73829600 u_know_who_ B March 20, 2020, 7:49 p.m. OK GNU C++14 TESTS 127 31 0
73829169 HighOnC B March 20, 2020, 7:42 p.m. OK GNU C++14 TESTS 127 31 0
73826363 harmonpreet012 B March 20, 2020, 7:09 p.m. OK GNU C++14 TESTS 127 31 0
73820081 Pooriya3060 B March 20, 2020, 6:05 p.m. OK GNU C++14 TESTS 127 31 0
73805190 alimq B March 20, 2020, 3:11 p.m. OK GNU C++14 TESTS 127 31 0
73792278 kk1999 B March 20, 2020, 12:36 p.m. OK GNU C++14 TESTS 127 31 0
73788606 sak6e B March 20, 2020, 11:52 a.m. OK GNU C++14 TESTS 127 31 0
73786950 illiaf B March 20, 2020, 11:31 a.m. OK GNU C++14 TESTS 127 31 0
73786165 himanshu8 B March 20, 2020, 11:20 a.m. OK GNU C++14 TESTS 127 31 0
73081426 tasneemwaleed B March 12, 2020, 3:13 p.m. OK GNU C++17 TESTS 127 30 307200
73082924 _wwbtxdy_ B March 12, 2020, 3:26 p.m. OK GNU C++17 TESTS 127 30 307200
73800652 waltz26 B March 20, 2020, 2:17 p.m. OK GNU C++17 TESTS 127 31 0
73816160 mohantyj B March 20, 2020, 5:30 p.m. OK GNU C++17 TESTS 127 31 0
73819147 mahbuburrahmamfahim B March 20, 2020, 5:57 p.m. OK GNU C++17 TESTS 127 31 0
73821647 chawlajay111 B March 20, 2020, 6:19 p.m. OK GNU C++17 TESTS 127 31 0
73829399 pradnesh B March 20, 2020, 7:46 p.m. OK GNU C++17 TESTS 127 31 0
73832578 secretlearner.68 B March 20, 2020, 8:30 p.m. OK GNU C++17 TESTS 127 31 0
73802747 M.Soliman B March 20, 2020, 2:41 p.m. OK GNU C++17 TESTS 127 31 0
73806809 vlad.iftimescu B March 20, 2020, 3:30 p.m. OK GNU C++17 TESTS 127 31 0
73275233 coyorkdow B March 14, 2020, 5:54 p.m. OK Go TESTS 127 46 0
73195725 Flowersea B March 14, 2020, 7:54 a.m. OK Go TESTS 127 46 0
73116114 snow_bear_328 B March 13, 2020, 3:43 a.m. OK Go TESTS 127 46 0
73473536 keshu6598 B March 17, 2020, 10:30 a.m. OK Go TESTS 127 93 102400
73598196 cashitsuki B March 18, 2020, 6:13 p.m. OK Haskell TESTS 127 171 102400
73131715 cunitac B March 13, 2020, 9:16 a.m. OK Haskell TESTS 127 217 102400
73450855 sakt_coder B March 17, 2020, 3:22 a.m. OK Java 11 TESTS 127 186 0
73794189 DreamInfinite B March 20, 2020, 1 p.m. OK Java 11 TESTS 127 186 0
73453257 sajith B March 17, 2020, 4:45 a.m. OK Java 11 TESTS 127 186 0
73189350 girkarkshitij B March 14, 2020, 6:06 a.m. OK Java 11 TESTS 127 186 0
73770225 OBrutus B March 20, 2020, 7:30 a.m. OK Java 11 TESTS 127 187 0
73524173 Clowyy B March 17, 2020, 8:50 p.m. OK Java 11 TESTS 127 187 0
73329805 happy15 B March 15, 2020, 11:39 a.m. OK Java 11 TESTS 127 187 0
73212606 mpanyavin B March 14, 2020, 12:18 p.m. OK Java 11 TESTS 127 187 0
73184750 tusharjape007 B March 14, 2020, 4:25 a.m. OK Java 11 TESTS 127 187 0
73165287 nt_7 B March 13, 2020, 6:41 p.m. OK Java 11 TESTS 127 187 0
73319698 ykt836 B March 15, 2020, 9:18 a.m. OK Java 8 TESTS 127 109 0
73815404 LemonPudding B March 20, 2020, 5:23 p.m. OK Java 8 TESTS 127 124 0
73793321 Nirav412000 B March 20, 2020, 12:50 p.m. OK Java 8 TESTS 127 124 0
73782518 anto777 B March 20, 2020, 10:26 a.m. OK Java 8 TESTS 127 124 0
73781266 TUPA_NE_SILEN_V_KODE B March 20, 2020, 10:08 a.m. OK Java 8 TESTS 127 124 0
73754664 davidSC B March 20, 2020, 3:02 a.m. OK Java 8 TESTS 127 124 0
73629308 codegeekabhi B March 19, 2020, 6:56 a.m. OK Java 8 TESTS 127 124 0
73610704 TWO_POINTER B March 18, 2020, 9:56 p.m. OK Java 8 TESTS 127 124 0
73575431 kocko B March 18, 2020, 1:43 p.m. OK Java 8 TESTS 127 124 0
73531816 Mildog B March 18, 2020, 1:12 a.m. OK Java 8 TESTS 127 124 0
73103560 jhonber B March 12, 2020, 8:27 p.m. OK JavaScript TESTS 127 46 1638400
73152920 Smakson B March 13, 2020, 4:09 p.m. OK Kotlin TESTS 127 139 0
73172719 ostroumov B March 13, 2020, 8:41 p.m. OK Kotlin TESTS 127 139 0
73114244 Spheniscine B March 13, 2020, 2:45 a.m. OK Kotlin TESTS 127 139 0
73084184 SlavaG B March 12, 2020, 3:37 p.m. OK Kotlin TESTS 127 140 0
73789477 Killer45 B March 20, 2020, 12:03 p.m. OK Kotlin TESTS 127 140 512000
73160565 DisPony B March 13, 2020, 5:42 p.m. OK Kotlin TESTS 127 187 204800
73127835 ZakoylovIlya B March 13, 2020, 8 a.m. OK Kotlin TESTS 127 187 204800
73284933 bohuss B March 14, 2020, 7:56 p.m. OK Kotlin TESTS 127 187 614400
73201523 CrazyDr B March 14, 2020, 9:26 a.m. OK Kotlin TESTS 127 234 0
73190833 YESMAths B March 14, 2020, 6:31 a.m. OK Kotlin TESTS 127 264 0
73147297 TRR B March 13, 2020, 2:57 p.m. OK Mono C# TESTS 127 62 409600
73334033 treasuryonly B March 15, 2020, 12:34 p.m. OK Mono C# TESTS 127 62 614400
73537781 de_loo B March 18, 2020, 4:30 a.m. OK Mono C# TESTS 127 62 3993600
73433135 Paul3ioan B March 16, 2020, 6:38 p.m. OK Mono C# TESTS 127 62 5734400
73083784 nikitos111 B March 12, 2020, 3:33 p.m. OK Mono C# TESTS 127 77 307200
73127396 ansergeyg B March 13, 2020, 7:52 a.m. OK Mono C# TESTS 127 77 307200
73185456 shy3205 B March 14, 2020, 4:45 a.m. OK Mono C# TESTS 127 77 3993600
73130595 vvevgeny B March 13, 2020, 8:57 a.m. OK Mono C# TESTS 127 77 4096000
73441205 amir.jhanem B March 16, 2020, 9:14 p.m. OK Mono C# TESTS 127 187 4300800
73441012 amir.jhanem B March 16, 2020, 9:09 p.m. OK Mono C# TESTS 127 421 4505600
73571475 vjudge1 B March 18, 2020, 12:57 p.m. OK MS C++ TESTS 127 31 0
73761058 Jatin_Hack B March 20, 2020, 5:17 a.m. OK MS C++ TESTS 127 31 0
73794422 vjudge4 B March 20, 2020, 1:03 p.m. OK MS C++ TESTS 127 31 0
73794577 vjudge5 B March 20, 2020, 1:05 p.m. OK MS C++ TESTS 127 31 0
73795071 vjudge1 B March 20, 2020, 1:11 p.m. OK MS C++ TESTS 127 31 0
73488486 vjudge1 B March 17, 2020, 1:15 p.m. OK MS C++ TESTS 127 31 0
73796065 vjudge2 B March 20, 2020, 1:22 p.m. OK MS C++ TESTS 127 31 0
73486465 vjudge1 B March 17, 2020, 12:53 p.m. OK MS C++ TESTS 127 31 0
73479487 vjudge4 B March 17, 2020, 11:50 a.m. OK MS C++ TESTS 127 31 0
73476564 vjudge4 B March 17, 2020, 11:12 a.m. OK MS C++ TESTS 127 31 0
73191788 omerb.zeybek B March 14, 2020, 6:46 a.m. OK MS C++ 2017 TESTS 127 31 0
73294904 vjudge4 B March 15, 2020, 12:47 a.m. OK MS C++ 2017 TESTS 127 31 0
73192546 Chinmize B March 14, 2020, 7 a.m. OK MS C++ 2017 TESTS 127 31 0
73185071 vjudge3 B March 14, 2020, 4:34 a.m. OK MS C++ 2017 TESTS 127 31 0
73086867 MAXBACK B March 12, 2020, 4:06 p.m. OK MS C++ 2017 TESTS 127 31 0
73394870 vjudge3 B March 16, 2020, 9:25 a.m. OK MS C++ 2017 TESTS 127 31 102400
73221954 varus1088 B March 14, 2020, 2:30 p.m. OK MS C++ 2017 TESTS 127 31 102400
73710469 naveen_anagandula B March 19, 2020, 3:59 p.m. OK MS C++ 2017 TESTS 127 31 102400
73342922 danilgrig B March 15, 2020, 2:28 p.m. OK MS C++ 2017 TESTS 127 31 307200
73799117 vjudge1 B March 20, 2020, 1:57 p.m. OK MS C++ 2017 TESTS 127 31 307200
73443934 Harolinch B March 16, 2020, 10:41 p.m. OK Node.js TESTS 127 171 1433600
73095832 PepegaClown B March 12, 2020, 6:10 p.m. OK PascalABC.NET TESTS 127 264 0
73093029 mayakin B March 12, 2020, 5:30 p.m. OK PHP TESTS 127 46 409600
73557508 jolt.tks B March 18, 2020, 9:53 a.m. OK PyPy 2 TESTS 127 140 716800
73091494 sid597 B March 12, 2020, 5:10 p.m. OK PyPy 2 TESTS 127 140 1126400
73210687 yumtam B March 14, 2020, 11:50 a.m. OK PyPy 2 TESTS 127 155 614400
73085583 _apurv_ B March 12, 2020, 3:52 p.m. OK PyPy 2 TESTS 127 155 614400
73125712 tan_delhi B March 13, 2020, 7:16 a.m. OK PyPy 2 TESTS 127 170 1945600
73344773 elvar333 B March 15, 2020, 2:52 p.m. OK PyPy 2 TESTS 127 186 614400
73082293 snape_here B March 12, 2020, 3:20 p.m. OK PyPy 2 TESTS 127 187 512000
73314016 peijinz B March 15, 2020, 7:54 a.m. OK PyPy 2 TESTS 127 202 204800
73417096 shehebe B March 16, 2020, 2:58 p.m. OK PyPy 2 TESTS 127 217 1843200
73090181 apoorv1999 B March 12, 2020, 4:51 p.m. OK PyPy 2 TESTS 127 218 1126400
73507498 Mirali B March 17, 2020, 4:57 p.m. OK PyPy 3 TESTS 127 140 1740800
73496095 I_Love_Nhi_Nguyen B March 17, 2020, 2:43 p.m. OK PyPy 3 TESTS 127 155 1843200
73095990 _monkfromearth_ B March 12, 2020, 6:12 p.m. OK PyPy 3 TESTS 127 155 1843200
73458969 Meslour B March 17, 2020, 6:41 a.m. OK PyPy 3 TESTS 127 155 1945600
73640696 Munchy_1 B March 19, 2020, 9:41 a.m. OK PyPy 3 TESTS 127 155 2150400
73392338 despairrr B March 16, 2020, 8:44 a.m. OK PyPy 3 TESTS 127 155 2150400
73345365 deepaksati719 B March 15, 2020, 3 p.m. OK PyPy 3 TESTS 127 155 2150400
73151094 exception420 B March 13, 2020, 3:46 p.m. OK PyPy 3 TESTS 127 155 2150400
73101989 GuiS B March 12, 2020, 7:56 p.m. OK PyPy 3 TESTS 127 155 2150400
73219781 belegonovdima B March 14, 2020, 1:59 p.m. OK PyPy 3 TESTS 127 155 2252800
73298056 Mike10 B March 15, 2020, 2:42 a.m. OK Python 2 TESTS 127 888 512000
73511778 manvigoel B March 17, 2020, 5:45 p.m. OK Python 2 TESTS 127 1450 409600
73148607 KA_Rma B March 13, 2020, 3:14 p.m. OK Python 3 TESTS 127 109 307200
73560110 Gungga B March 18, 2020, 10:30 a.m. OK Python 3 TESTS 127 109 614400
73410000 nandlalkajugad B March 16, 2020, 1:12 p.m. OK Python 3 TESTS 127 109 716800
73284097 jamesbaker B March 14, 2020, 7:42 p.m. OK Python 3 TESTS 127 109 716800
73320731 nicola.bisetto B March 15, 2020, 9:32 a.m. OK Python 3 TESTS 127 124 307200
73780432 cs1g B March 20, 2020, 9:56 a.m. OK Python 3 TESTS 127 124 409600
73555100 sergevkim B March 18, 2020, 9:19 a.m. OK Python 3 TESTS 127 124 409600
73190439 a4aakash B March 14, 2020, 6:25 a.m. OK Python 3 TESTS 127 124 409600
73188385 pavankalyan_10 B March 14, 2020, 5:48 a.m. OK Python 3 TESTS 127 124 512000
73167179 ryo_n B March 13, 2020, 7:07 p.m. OK Python 3 TESTS 127 124 512000
73104038 TryUntilDeath B March 12, 2020, 8:38 p.m. OK Ruby TESTS 127 546 204800
73083683 sansen B March 12, 2020, 3:32 p.m. OK Rust TESTS 127 31 409600
73539231 treeIQ B March 18, 2020, 5:06 a.m. OK Rust TESTS 127 31 512000
73434970 Conder65535 B March 16, 2020, 7:09 p.m. OK Rust TESTS 127 46 102400
73778014 the.shank B March 20, 2020, 9:20 a.m. OK Rust TESTS 127 46 307200

remove filters

Back to search problems