2023-2024 ICPC, Asia Jakarta Regional Contest (Online Mirror, Unrated, ICPC Rules, Teams Preferred)

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
1906 2023-2024 ICPC, Asia Jakarta Regional Contest (Online Mirror, Unrated, ICPC Rules, Teams Preferred) FINISHED False 18000 30245099 Dec. 3, 2023, 4:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 549 ) L Palindromic Parentheses PROGRAMMING constructive algorithms

B'Construct a parentheses sequence consisting of N characters such that it is balanced and the length of its longest palindromic subsequence (LPS) is exactly K . Determine whether such a construction is possible. If there are several possible sequences, construct any of them. A parentheses sequence consists of only character ( and ). A parentheses sequence is balanced if each character ( has a corresponding character ) and the pairs of parentheses are properly nested. For example, (), (()), (())(), and ((())()) are balanced. However, )(, ((), and ()) are not balanced. A sequence is palindromic if it reads the same backwards as forwards. For example, ((, ), ())(, and (()(( are palindromic. However, (), )(, and (()) are not palindromic. A subsequence can be derived from another sequence by removing zero or more characters without changing the order of the remaining characters. For example, (, ))), ())(, and (())() are subsequence of (())(). However, )(( and ((())) are not subsequence of (())(). The longest palindromic subsequence (LPS) of a sequence is a subsequence with the maximum number of characters, derived from that sequence and it is palindromic. For example, the LPS of sequence (())() is ())(, which can be obtained by removing the second and sixth characters. Therefore, the length of the LPS of (())() is 4 . Input consists of two integers N K ( 2 <= q N <= q 2000; 1 <= q K <= q N ). N is an even number. If there is no such parentheses sequence such that it is balanced and the length of its LPS is exactly K , then output -1. Otherwise, output a string of N characters, representing the parentheses sequence. If there are several possible answers, output any of them. Explanation for the sample input/output #2 The LPS of (()()) is either ((( by removing all ) characters, or ))) by removing all ( characters. The output ((())) also satisfies the requirements. Explanation for the sample input/output #3 The only '...

Tutorials

problem_analysis.pdf

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
235504417 lunilay2002 L Dec. 3, 2023, 10:20 a.m. OK GNU C11 TESTS 74 31 0
235484443 StarSilk L Dec. 3, 2023, 7:52 a.m. OK GNU C++14 TESTS 74 15 0
235523155 subhasravani L Dec. 3, 2023, 1:01 p.m. OK GNU C++17 TESTS 74 15 0
235496365 robertoeugenio kimmoqt L Dec. 3, 2023, 9:17 a.m. OK GNU C++17 TESTS 74 15 0
235496207 jeremyjod cthkw_00 kevzz L Dec. 3, 2023, 9:16 a.m. OK GNU C++17 TESTS 74 15 0
235494869 jeremyjod cthkw_00 kevzz L Dec. 3, 2023, 9:06 a.m. OK GNU C++17 TESTS 74 15 0
235493963 aa2985759 AkaiLemon yang12138 L Dec. 3, 2023, 8:59 a.m. OK GNU C++17 TESTS 74 15 0
235487280 Luqman wiwitrifai jonathanirvings L Dec. 3, 2023, 8:13 a.m. OK GNU C++17 TESTS 74 15 0
235476431 gisp_zjz triple__a Roundgod L Dec. 3, 2023, 6:51 a.m. OK GNU C++17 TESTS 74 15 0
235650929 yang12138 L Dec. 4, 2023, 3:15 a.m. OK GNU C++17 TESTS 74 15 0
235491738 aymanrasheed7 serotonin Alpha_Q L Dec. 3, 2023, 8:44 a.m. OK GNU C++17 TESTS 74 15 307200
235572592 IceBorworntat L Dec. 3, 2023, 3:31 p.m. OK GNU C++17 TESTS 74 30 0
235483103 maomao90 L Dec. 3, 2023, 7:43 a.m. OK GNU C++17 (64) TESTS 74 15 0
235487392 Luqman wiwitrifai jonathanirvings L Dec. 3, 2023, 8:13 a.m. OK GNU C++17 (64) TESTS 74 15 0
235486381 BigHeadCarrot niao_v AKCqhzdy L Dec. 3, 2023, 8:06 a.m. OK GNU C++17 (64) TESTS 74 15 0
235501741 Physics212303 L Dec. 3, 2023, 9:57 a.m. OK GNU C++17 (64) TESTS 74 15 0
235618722 chappy1 L Dec. 3, 2023, 6:11 p.m. OK GNU C++17 (64) TESTS 74 15 0
235481967 negative1 User_Carrot N_z__ L Dec. 3, 2023, 7:36 a.m. OK GNU C++17 (64) TESTS 74 15 102400
235476217 ITworker_Z red-stone L Dec. 3, 2023, 6:49 a.m. OK GNU C++17 (64) TESTS 74 15 512000
235498174 cxm1024 IceYukino pp_orange L Dec. 3, 2023, 9:29 a.m. OK GNU C++17 (64) TESTS 74 15 16076800
235488395 heno239 L Dec. 3, 2023, 8:21 a.m. OK GNU C++17 (64) TESTS 74 31 8806400
235487682 KKT_89 Puranya_ ikefumy L Dec. 3, 2023, 8:16 a.m. OK GNU C++17 (64) TESTS 74 46 17408000
235492642 hohohahahihi Normie28 ilovevoi L Dec. 3, 2023, 8:50 a.m. OK GNU C++20 (64) TESTS 74 0 0
235636552 SorahISA L Dec. 3, 2023, 9:47 p.m. OK GNU C++20 (64) TESTS 74 15 0
235551039 rgnerdplayer L Dec. 3, 2023, 2:55 p.m. OK GNU C++20 (64) TESTS 74 15 0
235544123 -1e11 L Dec. 3, 2023, 2:45 p.m. OK GNU C++20 (64) TESTS 74 15 0
235529842 WAtoAC2001 L Dec. 3, 2023, 1:58 p.m. OK GNU C++20 (64) TESTS 74 15 0
235528291 Rafi02 jjaworska Giselus L Dec. 3, 2023, 1:46 p.m. OK GNU C++20 (64) TESTS 74 15 0
235528107 Rafi02 jjaworska Giselus L Dec. 3, 2023, 1:44 p.m. OK GNU C++20 (64) TESTS 74 15 0
235528783 dj4zo6u.6 L Dec. 3, 2023, 1:50 p.m. OK GNU C++20 (64) TESTS 74 15 0
235654103 I_love_GSNQK L Dec. 4, 2023, 4:12 a.m. OK GNU C++20 (64) TESTS 74 15 0
235640512 GenghizKhan L Dec. 3, 2023, 11:30 p.m. OK GNU C++20 (64) TESTS 74 15 0
235552121 arvindf232 L Dec. 3, 2023, 2:56 p.m. OK Kotlin 1.6 TESTS 74 280 21299200
235476129 huangxw L Dec. 3, 2023, 6:49 a.m. OK PyPy 3-64 TESTS 74 93 2764800
235569425 2110030117 L Dec. 3, 2023, 3:26 p.m. OK Python 3 TESTS 74 46 0
235530657 sohan507 L Dec. 3, 2023, 2:05 p.m. OK Python 3 TESTS 74 46 0
235490844 HaoxuanXIE SingleZombie forxen L Dec. 3, 2023, 8:38 a.m. OK Python 3 TESTS 74 46 0

remove filters

Back to search problems