CodeTON Round 8 (Div. 1 + Div. 2, Rated, Prizes!)

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
1942 CodeTON Round 8 (Div. 1 + Div. 2, Rated, Prizes!) FINISHED False 10800 20013899 March 30, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2816 ) D Learning to Paint PROGRAMMING data structures dp greedy

B'Elsie is learning how to paint. She has a canvas of n cells numbered from 1 to n and can paint any (potentially empty) subset of cells. Elsie has a 2D array a which she will use to evaluate paintings. Let the maximal contiguous intervals of painted cells in a painting be [l_1,r_1],[l_2,r_2], ldots,[l_x,r_x] . The beauty of the painting is the sum of a_{l_i,r_i} over all 1 <= i <= x . In the image above, the maximal contiguous intervals of painted cells are [2,4],[6,6],[8,9] and the beauty of the painting is a_{2,4}+a_{6,6}+a_{8,9} . There are 2^n ways to paint the strip. Help Elsie find the k largest possible values of the beauty of a painting she can obtain, among all these ways. Note that these k values do not necessarily have to be distinct. It is guaranteed that there are at least k different ways to paint the canvas. The first line contains a single integer t ( 1 <= q t <= q 10^3 ) -- the number of test cases. The first line of each test case contains 2 integers n and k ( 1 <= q n <= q 10^3 , 1 <= q k <= q min(2^n, 5 cdot 10^3) ) -- the number of cells and the number of largest values of the beauty of a painting you must find. The next n lines of each test case describe a where the i -th of which contains n-i+1 integers a_{i,i},a_{i,i+1}, ldots,a_{i,n} ( -10^6 <= q a_{i,j} <= q 10^6 ). It is guaranteed the sum of n over all test cases does not exceed 10^3 and the sum of k over all test cases does not exceed 5 cdot 10^3 . For each test case, output k integers in one line: the i -th of them must represent the i -th largest value of the beauty of a painting Elsie can obtain. In the first test case, Elsie can either paint the only cell or not paint it. If she paints the only cell, the beauty of the painting is -5 . If she chooses not to paint it, the beauty of'...

Tutorials

CodeTON Round 8 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
254233859 mban259 D March 31, 2024, 2:05 a.m. OK C# 10 TESTS 23 1060 87552000
254197487 eulerscheZahl D March 30, 2024, 5:33 p.m. OK C# 10 TESTS 22 2495 117145600
254236788 masonpop D March 31, 2024, 2:55 a.m. OK C++14 (GCC 6-32) TESTS 23 436 36864000
254185862 squaredog D March 30, 2024, 4:56 p.m. OK C++14 (GCC 6-32) TESTS 22 483 301260800
254214619 mat_v D March 30, 2024, 8:17 p.m. OK C++14 (GCC 6-32) TESTS 23 545 36864000
254192435 wxt1221 D March 30, 2024, 5:17 p.m. OK C++14 (GCC 6-32) TESTS 22 545 36864000
254186264 honey D March 30, 2024, 4:57 p.m. OK C++14 (GCC 6-32) TESTS 22 577 401715200
254194697 liushengfeng D March 30, 2024, 5:25 p.m. OK C++14 (GCC 6-32) TESTS 22 717 24473600
254196875 hollis_yang D March 30, 2024, 5:31 p.m. OK C++14 (GCC 6-32) TESTS 22 765 48844800
254185041 Luzhuoyuan D March 30, 2024, 4:53 p.m. OK C++14 (GCC 6-32) TESTS 22 810 38195200
254196668 xtalclr D March 30, 2024, 5:31 p.m. OK C++14 (GCC 6-32) TESTS 22 810 91238400
254192868 Aqua2006 D March 30, 2024, 5:19 p.m. OK C++14 (GCC 6-32) TESTS 22 811 48947200
254208049 SiberianKhatru D March 30, 2024, 7:09 p.m. OK C++17 (GCC 7-32) TESTS 22 327 169267200
254221879 richardl02 D March 30, 2024, 9:53 p.m. OK C++17 (GCC 7-32) TESTS 23 405 37273600
254208010 sanbi52 D March 30, 2024, 7:08 p.m. OK C++17 (GCC 7-32) TESTS 22 405 37376000
254187529 marc2825 D March 30, 2024, 5:01 p.m. OK C++17 (GCC 7-32) TESTS 22 420 28057600
254246519 CodeK_G D March 31, 2024, 5:19 a.m. OK C++17 (GCC 7-32) TESTS 23 421 24371200
254228021 _Ash__ D March 31, 2024, midnight OK C++17 (GCC 7-32) TESTS 23 436 37068800
254210317 vladalos D March 30, 2024, 7:32 p.m. OK C++17 (GCC 7-32) TESTS 22 436 69529600
254202486 stevenwjy D March 30, 2024, 6:26 p.m. OK C++17 (GCC 7-32) TESTS 22 451 24268800
254220103 rohitjazz199955 D March 30, 2024, 9:26 p.m. OK C++17 (GCC 7-32) TESTS 23 451 24678400
254184915 DennisTran D March 30, 2024, 4:53 p.m. OK C++17 (GCC 7-32) TESTS 22 451 36864000
254203035 hugo4CF D March 30, 2024, 6:29 p.m. OK C++20 (GCC 13-64) TESTS 22 295 36659200
254185595 CentroidZ D March 30, 2024, 4:55 p.m. OK C++20 (GCC 13-64) TESTS 22 311 24268800
254233439 yaoxi D March 31, 2024, 1:58 a.m. OK C++20 (GCC 13-64) TESTS 23 311 44748800
254228291 enslaved D March 31, 2024, 12:07 a.m. OK C++20 (GCC 13-64) TESTS 23 327 22220800
254244009 izumi_shiho D March 31, 2024, 4:50 a.m. OK C++20 (GCC 13-64) TESTS 23 327 36761600
254239608 lprdsb D March 31, 2024, 3:44 a.m. OK C++20 (GCC 13-64) TESTS 23 327 44441600
254212582 sai-17 D March 30, 2024, 7:55 p.m. OK C++20 (GCC 13-64) TESTS 22 327 44851200
254191846 wangmarui D March 30, 2024, 5:15 p.m. OK C++20 (GCC 13-64) TESTS 22 327 48742400
254189716 DanTheMan. D March 30, 2024, 5:08 p.m. OK C++20 (GCC 13-64) TESTS 22 327 48844800
254186917 ha___il D March 30, 2024, 4:59 p.m. OK C++20 (GCC 13-64) TESTS 22 327 73830400
254187879 Gassa D March 30, 2024, 5:02 p.m. OK D TESTS 22 2635 74752000
254203182 rainboy D March 30, 2024, 6:30 p.m. OK GNU C11 TESTS 22 358 24371200
254186002 pengin_2000 D March 30, 2024, 4:56 p.m. OK GNU C11 TESTS 22 2573 201011200
254247144 nguyenquocthao00 D March 31, 2024, 5:26 a.m. OK Go TESTS 23 1263 114688000
254215054 drdilyor D March 30, 2024, 8:22 p.m. OK Haskell TESTS 23 998 327782400
254215176 drdilyor D March 30, 2024, 8:24 p.m. OK Haskell TESTS 23 1123 329932800
254204408 drdilyor D March 30, 2024, 6:39 p.m. OK Haskell TESTS 22 1310 329932800
254226369 Menezes_Dean D March 30, 2024, 11:21 p.m. OK Haskell TESTS 23 1419 329932800
254204435 drdilyor D March 30, 2024, 6:39 p.m. OK Haskell TESTS 22 2511 355123200
254202845 drdilyor D March 30, 2024, 6:28 p.m. OK Haskell TESTS 22 2947 390860800
254204814 drdilyor D March 30, 2024, 6:42 p.m. OK Haskell TESTS 22 4233 458035200
254195522 profchi D March 30, 2024, 5:27 p.m. OK Java 21 TESTS 22 1684 42188800
254217931 santanu2414 D March 30, 2024, 8:57 p.m. OK Java 21 TESTS 23 1700 337817600
254186126 ProjectYoung D March 30, 2024, 4:57 p.m. OK Java 21 TESTS 22 2916 198246400
254194613 UlaanBatat D March 30, 2024, 5:24 p.m. OK Java 21 TESTS 22 3181 41062400
254202463 warks D March 30, 2024, 6:26 p.m. OK Java 21 TESTS 22 4024 41369600
254202352 nomadicjuggrnaut D March 30, 2024, 6:25 p.m. OK Java 8 TESTS 22 1092 139776000
254215654 hxu10 D March 30, 2024, 8:29 p.m. OK PyPy 3 TESTS 23 4180 64000000
254240977 SoleProprietor D March 31, 2024, 4:06 a.m. OK PyPy 3-64 TESTS 23 1325 69427200
254208703 bronze_coder D March 30, 2024, 7:16 p.m. OK PyPy 3-64 TESTS 22 1591 147968000
254240299 eepsilon D March 31, 2024, 3:56 a.m. OK PyPy 3-64 TESTS 23 1762 93388800
254191411 Alex239 D March 30, 2024, 5:14 p.m. OK PyPy 3-64 TESTS 22 1934 107315200
254217048 hxu10 D March 30, 2024, 8:46 p.m. OK PyPy 3-64 TESTS 23 2202 153088000
254208539 drdilyor D March 30, 2024, 7:14 p.m. OK PyPy 3-64 TESTS 22 4102 109363200
254202403 hxu10 D March 30, 2024, 6:26 p.m. OK PyPy 3-64 TESTS 22 4102 125644800
254215017 hxu10 D March 30, 2024, 8:22 p.m. OK PyPy 3-64 TESTS 23 4281 127180800
254208384 drdilyor D March 30, 2024, 7:12 p.m. OK PyPy 3-64 TESTS 22 4492 109670400
254185486 robostac D March 30, 2024, 4:55 p.m. OK Rust 2021 TESTS 22 452 71577600

remove filters

Back to search problems