Educational Codeforces Round 139 (Rated for 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
1766 Educational Codeforces Round 139 (Rated for Div. 2) FINISHED False 7200 66324263 Dec. 12, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1264 ) E Decomposition PROGRAMMING brute force divide and conquer dp matrices

B"For a sequence of integers [x_1, x_2, ... , x_k] , let's define its decomposition as follows: Process the sequence from the first element to the last one, maintaining the list of its subsequences. When you process the element x_i , append it to the end of the first subsequence in the list such that the bitwise AND of its last element and x_i is greater than 0 . If there is no such subsequence in the list, create a new subsequence with only one element x_i and append it to the end of the list of subsequences. For example, let's analyze the decomposition of the sequence [1, 3, 2, 0, 1, 3, 2, 1] : The resulting list of subsequences is [[1, 3, 2, 3, 2], [0], [1, 1]] . Let f([x_1, x_2, ... , x_k]) be the number of subsequences the sequence [x_1, x_2, ... , x_k] is decomposed into. Now, for the problem itself. You are given a sequence [a_1, a_2, ... , a_n] , where each element is an integer from 0 to 3 . Let a[i..j] be the sequence [a_i, a_{i+1}, ... , a_j] . You have to calculate sum limits_{i=1}^n sum limits_{j=i}^n f(a[i..j]) . The first line contains one integer n ( 1 <= n <= 3 cdot 10^5 ). The second line contains n integers a_1, a_2, ... , a_n ( 0 <= a_i <= 3 ). Print one integer, which should be equal to sum limits_{i=1}^n sum limits_{j=i}^n f(a[i..j]) . "...

Tutorials

110066

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
185021844 weixin E Dec. 13, 2022, 1:32 a.m. OK GNU C++14 TESTS 54 46 1228800
185134633 prairie2022 E Dec. 14, 2022, 2:51 a.m. OK GNU C++14 TESTS 54 78 0
185026061 BaoJiaoPisu E Dec. 13, 2022, 3:07 a.m. OK GNU C++14 TESTS 54 78 12083200
185095408 Duy_e E Dec. 13, 2022, 3:33 p.m. OK GNU C++14 TESTS 54 93 1228800
185062927 william556 E Dec. 13, 2022, 10:51 a.m. OK GNU C++14 TESTS 54 93 30105600
185026466 yyf_0404 E Dec. 13, 2022, 3:15 a.m. OK GNU C++14 TESTS 54 109 6758400
185054714 include_BM E Dec. 13, 2022, 9:30 a.m. OK GNU C++14 TESTS 54 109 12288000
185137639 rickbaishuak E Dec. 14, 2022, 4:03 a.m. OK GNU C++14 TESTS 54 109 40857600
185134535 Wangxueyi E Dec. 14, 2022, 2:48 a.m. OK GNU C++14 TESTS 54 109 44544000
185025610 include_BM E Dec. 13, 2022, 2:59 a.m. OK GNU C++14 TESTS 54 124 12288000
185068189 amul_agrawal E Dec. 13, 2022, 11:39 a.m. OK GNU C++17 TESTS 54 77 0
185026457 20Ti_ntson E Dec. 13, 2022, 3:15 a.m. OK GNU C++17 TESTS 54 77 8499200
185070794 SonTungMtp E Dec. 13, 2022, 12:03 p.m. OK GNU C++17 TESTS 54 77 9932800
185052482 musescr7 E Dec. 13, 2022, 9:10 a.m. OK GNU C++17 TESTS 54 78 0
185049313 Haven_ E Dec. 13, 2022, 8:44 a.m. OK GNU C++17 TESTS 54 78 0
185030265 Haven_ E Dec. 13, 2022, 4:24 a.m. OK GNU C++17 TESTS 54 78 0
185015892 as3413332 E Dec. 12, 2022, 10:29 p.m. OK GNU C++17 TESTS 54 78 0
185040178 kartikey.gupta24 E Dec. 13, 2022, 7:03 a.m. OK GNU C++17 TESTS 54 78 1228800
185069894 gakshat468 E Dec. 13, 2022, 11:55 a.m. OK GNU C++17 TESTS 54 78 2457600
185040177 regian0001 E Dec. 13, 2022, 7:03 a.m. OK GNU C++17 TESTS 54 78 2457600
185097915 zhangboju E Dec. 13, 2022, 3:54 p.m. OK GNU C++17 (64) TESTS 54 31 0
185085673 drdilyor E Dec. 13, 2022, 2:11 p.m. OK GNU C++17 (64) TESTS 54 46 11468800
185132514 PEKKA_l E Dec. 14, 2022, 1:43 a.m. OK GNU C++17 (64) TESTS 54 46 31232000
185132403 PEKKA_l E Dec. 14, 2022, 1:40 a.m. OK GNU C++17 (64) TESTS 54 46 31232000
185042855 PEKKA_l E Dec. 13, 2022, 7:32 a.m. OK GNU C++17 (64) TESTS 54 46 31232000
185042714 PEKKA_l E Dec. 13, 2022, 7:30 a.m. OK GNU C++17 (64) TESTS 54 46 31232000
185025178 harshaa05 E Dec. 13, 2022, 2:51 a.m. OK GNU C++17 (64) TESTS 54 62 12697600
185024825 harshaa05 E Dec. 13, 2022, 2:43 a.m. OK GNU C++17 (64) TESTS 54 62 12697600
185053071 snowy2002 E Dec. 13, 2022, 9:15 a.m. OK GNU C++17 (64) TESTS 54 62 30617600
185051817 propane E Dec. 13, 2022, 9:04 a.m. OK GNU C++17 (64) TESTS 54 77 7168000
185048503 lichenghan E Dec. 13, 2022, 8:37 a.m. OK GNU C++20 (64) TESTS 54 31 21708800
185135081 Zesty_Fox E Dec. 14, 2022, 3:03 a.m. OK GNU C++20 (64) TESTS 54 46 0
185086951 Zesty_Fox E Dec. 13, 2022, 2:22 p.m. OK GNU C++20 (64) TESTS 54 46 0
185039056 ycp20030320 E Dec. 13, 2022, 6:53 a.m. OK GNU C++20 (64) TESTS 54 46 0
185007831 closed_id E Dec. 12, 2022, 8:17 p.m. OK GNU C++20 (64) TESTS 54 46 0
185026708 TeeJay_0 E Dec. 13, 2022, 3:20 a.m. OK GNU C++20 (64) TESTS 54 46 1228800
185021573 Rishab01 E Dec. 13, 2022, 1:24 a.m. OK GNU C++20 (64) TESTS 54 46 1228800
185047251 BibarysK E Dec. 13, 2022, 8:25 a.m. OK GNU C++20 (64) TESTS 54 46 2457600
185026734 clams E Dec. 13, 2022, 3:21 a.m. OK GNU C++20 (64) TESTS 54 46 2457600
185069407 Weobe E Dec. 13, 2022, 11:50 a.m. OK GNU C++20 (64) TESTS 54 46 2662400
185126962 dzhi E Dec. 13, 2022, 10:31 p.m. OK Java 11 TESTS 54 249 0
185127055 dzhi E Dec. 13, 2022, 10:34 p.m. OK Java 11 TESTS 54 311 0
185046222 profchi E Dec. 13, 2022, 8:13 a.m. OK Java 11 TESTS 54 483 50995200
184999838 YocyCraft E Dec. 12, 2022, 6:53 p.m. OK Java 17 TESTS 54 202 819200
184999962 YocyCraft E Dec. 12, 2022, 6:55 p.m. OK Java 17 TESTS 54 249 921600
185026052 omeganot E Dec. 13, 2022, 3:07 a.m. OK Java 8 TESTS 54 202 79769600
185049706 linxiaotian E Dec. 13, 2022, 8:47 a.m. OK Kotlin 1.6 TESTS 54 1231 204083200
185052601 mkawa2 E Dec. 13, 2022, 9:11 a.m. OK PyPy 3-64 TESTS 54 156 34918400
185013082 hkwu6013 E Dec. 12, 2022, 9:32 p.m. OK PyPy 3-64 TESTS 54 202 30515200
185007071 tassei903 E Dec. 12, 2022, 8:08 p.m. OK PyPy 3-64 TESTS 54 217 35123200
185016273 onemoreq E Dec. 12, 2022, 10:38 p.m. OK PyPy 3-64 TESTS 54 233 35020800
185112621 voicon E Dec. 13, 2022, 6:03 p.m. OK PyPy 3-64 TESTS 54 327 26419200
185005061 dalgu E Dec. 12, 2022, 7:45 p.m. OK PyPy 3-64 TESTS 54 358 36454400
185026832 Lhohelhohehmm E Dec. 13, 2022, 3:22 a.m. OK PyPy 3-64 TESTS 54 483 36044800
185101405 SophieHatter E Dec. 13, 2022, 4:24 p.m. OK PyPy 3-64 TESTS 54 1013 38604800
185069675 stdio2016 E Dec. 13, 2022, 11:53 a.m. OK Python 3 TESTS 54 3759 5734400
185132351 Spheniscine E Dec. 14, 2022, 1:38 a.m. OK Rust 2021 TESTS 54 62 2560000

remove filters

Back to search problems