Codeforces Global Round 22

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
1738 Codeforces Global Round 22 FINISHED False 9000 72717863 Sept. 30, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1588 ) E Balance Addicts PROGRAMMING combinatorics dp math two pointers

B"Given an integer sequence a_1, a_2, ... , a_n of length n , your task is to compute the number, modulo 998244353 , of ways to partition it into several non-empty continuous subsequences such that the sums of elements in the subsequences form a balanced sequence. A sequence s_1, s_2, ... , s_k of length k is said to be balanced, if s_{i} = s_{k-i+1} for every 1 <= q i <= q k . For example, [1, 2, 3, 2, 1] and [1,3,3,1] are balanced, but [1,5,15] is not. Formally, every partition can be described by a sequence of indexes i_1, i_2, ... , i_k of length k with 1 = i_1 < i_2 < ... < i_k <= q n such that Let s_1, s_2, ... , s_k denote the sums of elements in the subsequences with respect to the partition i_1, i_2, ... , i_k . Formally, for every 1 <= q j <= q k , s_j = sum_{i=i_{j}}^{i_{j+1}-1} a_i = a_{i_j} + a_{i_j+1} + ... + a_{i_{j+1}-1}. For example, the partition [1 ,| ,2,3 ,| ,4,5,6] of sequence [1,2,3,4,5,6] is described by the sequence [1,2,4] of indexes, and the sums of elements in the subsequences with respect to the partition is [1,5,15] . Two partitions i_1, i_2, ... , i_k and i'_1, i'_2, ... , i'_{k'} (described by sequences of indexes) are considered to be different, if at least one of the following holds. Each test contains multiple test cases. The first line contains an integer t ( 1 <= q t <= q 10^5 ) -- the number of test cases. The following lines contain the description of each test case. The first line of each test case contains an integer n ( 1 <= q n <= q 10^5 ), indicating the length of the sequence a . The second line of each test case contains n integers a_1, a_2, ... , a_n ( 0 <= q a_i <= q 10^9 ), indicating the elements of the sequence a . It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For eac"...

Tutorials

Editorial of Codeforces Global Round <strong>22</strong>

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
174154914 Gassa E Sept. 30, 2022, 5:03 p.m. OK D TESTS 52 202 6144000
174192120 nor E Oct. 1, 2022, 2:51 a.m. OK GNU C11 TESTS 52 31 102195200
174161012 chro4896 E Sept. 30, 2022, 6:10 p.m. OK GNU C11 TESTS 52 389 2355200
174152619 rainboy E Sept. 30, 2022, 4:58 p.m. OK GNU C11 TESTS 52 436 5222400
174196329 happydef E Oct. 1, 2022, 4 a.m. OK GNU C++14 TESTS 52 31 22732800
174147253 Xu_Hongxi E Sept. 30, 2022, 4:43 p.m. OK GNU C++14 TESTS 52 46 1638400
174187807 who_mius E Oct. 1, 2022, 1:33 a.m. OK GNU C++14 TESTS 52 62 2048000
174147883 awoo E Sept. 30, 2022, 4:45 p.m. OK GNU C++14 TESTS 52 62 2457600
174197654 Acfboy E Oct. 1, 2022, 4:20 a.m. OK GNU C++14 TESTS 52 62 2867200
174146970 zmj2008AKIOI E Sept. 30, 2022, 4:42 p.m. OK GNU C++14 TESTS 52 62 4608000
174170145 CK2021 E Sept. 30, 2022, 7:23 p.m. OK GNU C++14 TESTS 52 62 6041600
174191455 xuxuxuxuxu E Oct. 1, 2022, 2:39 a.m. OK GNU C++14 TESTS 52 62 48128000
174184004 zltzlt E Oct. 1, 2022, 12:04 a.m. OK GNU C++14 TESTS 52 77 9830400
174191362 xuxuxuxuxu E Oct. 1, 2022, 2:37 a.m. OK GNU C++14 TESTS 52 77 48128000
174201549 Bobocan E Oct. 1, 2022, 5:11 a.m. OK GNU C++17 TESTS 52 15 1740800
174191055 psc233 E Oct. 1, 2022, 2:32 a.m. OK GNU C++17 TESTS 52 46 1638400
174169472 CSQ31 E Sept. 30, 2022, 7:15 p.m. OK GNU C++17 TESTS 52 46 5734400
174151899 CrazyDave E Sept. 30, 2022, 4:56 p.m. OK GNU C++17 TESTS 52 46 56115200
174154854 Natsuzora E Sept. 30, 2022, 5:03 p.m. OK GNU C++17 TESTS 52 61 1228800
174152219 FEDIKUS E Sept. 30, 2022, 4:57 p.m. OK GNU C++17 TESTS 52 61 2457600
174150899 opportunityfan E Sept. 30, 2022, 4:53 p.m. OK GNU C++17 TESTS 52 62 2457600
174174352 CReaper1116 E Sept. 30, 2022, 8:18 p.m. OK GNU C++17 TESTS 52 62 2457600
174186968 cptxc E Oct. 1, 2022, 1:16 a.m. OK GNU C++17 TESTS 52 62 3993600
174149399 pyromahe E Sept. 30, 2022, 4:49 p.m. OK GNU C++17 TESTS 52 62 4812800
174160932 J_B_Y E Sept. 30, 2022, 6:10 p.m. OK GNU C++17 (64) TESTS 52 15 5632000
174155312 Temmie E Sept. 30, 2022, 5:03 p.m. OK GNU C++17 (64) TESTS 52 31 716800
174164686 propane E Sept. 30, 2022, 6:32 p.m. OK GNU C++17 (64) TESTS 52 46 1228800
174172532 antguz E Sept. 30, 2022, 7:52 p.m. OK GNU C++17 (64) TESTS 52 46 2457600
174161385 Sana E Sept. 30, 2022, 6:13 p.m. OK GNU C++17 (64) TESTS 52 46 2867200
174170326 Geothermal E Sept. 30, 2022, 7:25 p.m. OK GNU C++17 (64) TESTS 52 46 3584000
174150794 MateoCV E Sept. 30, 2022, 4:53 p.m. OK GNU C++17 (64) TESTS 52 46 3891200
174163395 lightseba E Sept. 30, 2022, 6:24 p.m. OK GNU C++17 (64) TESTS 52 46 3993600
174195138 EricQian E Oct. 1, 2022, 3:41 a.m. OK GNU C++17 (64) TESTS 52 46 5632000
174198098 EE97 E Oct. 1, 2022, 4:27 a.m. OK GNU C++17 (64) TESTS 52 46 7987200
174192359 nor E Oct. 1, 2022, 2:55 a.m. OK GNU C++20 (64) TESTS 52 15 11878400
174191690 HaccerKat E Oct. 1, 2022, 2:43 a.m. OK GNU C++20 (64) TESTS 52 31 1228800
174152402 MAKMED1337 E Sept. 30, 2022, 4:57 p.m. OK GNU C++20 (64) TESTS 52 31 2457600
174161030 HamletPetrosyan E Sept. 30, 2022, 6:11 p.m. OK GNU C++20 (64) TESTS 52 31 4812800
174163690 Shirorz E Sept. 30, 2022, 6:25 p.m. OK GNU C++20 (64) TESTS 52 31 4812800
174193149 nor E Oct. 1, 2022, 3:08 a.m. OK GNU C++20 (64) TESTS 52 31 5939200
174163775 GoogleBot E Sept. 30, 2022, 6:26 p.m. OK GNU C++20 (64) TESTS 52 31 8806400
174192325 nor E Oct. 1, 2022, 2:54 a.m. OK GNU C++20 (64) TESTS 52 31 21913600
174192185 nor E Oct. 1, 2022, 2:52 a.m. OK GNU C++20 (64) TESTS 52 31 102092800
174193796 xls_is_real_dd E Oct. 1, 2022, 3:19 a.m. OK GNU C++20 (64) TESTS 52 46 1228800
174205781 dzhi E Oct. 1, 2022, 5:58 a.m. OK Java 11 TESTS 52 950 9830400
174205463 dzhi E Oct. 1, 2022, 5:55 a.m. OK Java 11 TESTS 52 966 9830400
174162936 arvindf232 E Sept. 30, 2022, 6:21 p.m. OK Kotlin 1.6 TESTS 52 373 5222400
174153473 elizarov E Sept. 30, 2022, 4:59 p.m. OK Kotlin 1.6 TESTS 52 904 5734400
174151096 hxu10 E Sept. 30, 2022, 4:54 p.m. OK PyPy 3 TESTS 52 499 24473600
174152392 SPD_9X2 E Sept. 30, 2022, 4:57 p.m. OK PyPy 3 TESTS 52 608 47718400
174172232 sushmanth.dampur8780 E Sept. 30, 2022, 7:48 p.m. OK PyPy 3 TESTS 52 904 40038400
174161285 toam E Sept. 30, 2022, 6:12 p.m. OK PyPy 3-64 TESTS 52 373 30720000
174150614 rikein12 E Sept. 30, 2022, 4:52 p.m. OK PyPy 3-64 TESTS 52 826 16281600
174173296 tim_zay E Sept. 30, 2022, 8:02 p.m. OK PyPy 3-64 TESTS 52 1560 16384000
174169522 tim_zay E Sept. 30, 2022, 7:15 p.m. OK PyPy 3-64 TESTS 52 1606 17612800
174162761 Jimanbanashi E Sept. 30, 2022, 6:20 p.m. OK Python 2 TESTS 52 592 10649600
174150919 Jimanbanashi E Sept. 30, 2022, 4:53 p.m. OK Python 2 TESTS 52 763 10649600
174152710 cottoncotton E Sept. 30, 2022, 4:58 p.m. OK Rust 2021 TESTS 52 77 68915200

remove filters

Back to search problems