Codeforces Round 744 (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
1579 Codeforces Round 744 (Div. 3) FINISHED False 8100 104426663 Sept. 28, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2456 ) G Minimal Coverage PROGRAMMING binary search dp greedy

B'You are given n lengths of segments that need to be placed on an infinite axis with coordinates. The first segment is placed on the axis so that one of its endpoints lies at the point with coordinate 0 . Let 's call this endpoint the "start" of the first segment and let 's call its "end" as that endpoint that is not the start. The "start" of each following segment must coincide with the "end" of the previous one. Thus, if the length of the next segment is d and the "end" of the previous one has the coordinate x , the segment can be placed either on the coordinates [x-d, x] , and then the coordinate of its "end" is x - d , or on the coordinates [x, x+d] , in which case its "end" coordinate is x + d . The total coverage of the axis by these segments is defined as their overall union which is basically the set of points covered by at least one of the segments. It 's easy to show that the coverage will also be a segment on the axis. Determine the minimal possible length of the coverage that can be obtained by placing all the segments on the axis without changing their order. The first line contains an integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The next 2t lines contain descriptions of the test cases. The first line of each test case description contains an integer n ( 1 <= n <= 10^4 ) -- the number of segments. The second line of the description contains n space-separated integers a_i ( 1 <= a_i <= 1000 ) -- lengths of the segments in the same order they should be placed on the axis. It is guaranteed that the sum of n over all test cases does not exceed 10^4 . Print t lines, each line containing the answer to the corresponding test case. The answer to a test case should be a single integer -- the minimal possible length of the axis coverage. In the third sample test case the segments should be arranged as follows: [0, 6] righta'...

Tutorials

Codeforces Round #744 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
130300582 gxlois G Sept. 29, 2021, 8:05 p.m. OK D TESTS 21 342 127795200
130295930 ruban G Sept. 29, 2021, 6:40 p.m. OK Delphi TESTS 21 670 58982400
130299549 darkkcyan G Sept. 29, 2021, 7:45 p.m. OK FPC TESTS 21 171 3584000
130284761 zn_com G Sept. 29, 2021, 4:11 p.m. OK GNU C++14 TESTS 21 46 3788800
130253492 Food_Chain_Rule G Sept. 29, 2021, 10:38 a.m. OK GNU C++14 TESTS 21 46 3788800
130250202 JuruoAln G Sept. 29, 2021, 9:56 a.m. OK GNU C++14 TESTS 21 46 3788800
130247469 TLE_Automat G Sept. 29, 2021, 9:22 a.m. OK GNU C++14 TESTS 21 46 3788800
130240633 Crab_Dave G Sept. 29, 2021, 7:59 a.m. OK GNU C++14 TESTS 21 46 3788800
130312888 fishcathu. G Sept. 30, 2021, 3:07 a.m. OK GNU C++14 TESTS 21 61 3788800
130235916 Yao_ G Sept. 29, 2021, 7:01 a.m. OK GNU C++14 TESTS 21 61 3788800
130267432 IcMtr G Sept. 29, 2021, 1:09 p.m. OK GNU C++14 TESTS 21 62 3686400
130250255 JuruoAln G Sept. 29, 2021, 9:57 a.m. OK GNU C++14 TESTS 21 62 3788800
130245038 TLE_Automata G Sept. 29, 2021, 8:52 a.m. OK GNU C++14 TESTS 21 62 3788800
130241225 Sunnat G Sept. 29, 2021, 8:06 a.m. OK GNU C++17 TESTS 21 46 3891200
130242903 foreverSeven G Sept. 29, 2021, 8:27 a.m. OK GNU C++17 TESTS 21 46 7782400
130260454 wr316635858 G Sept. 29, 2021, 11:57 a.m. OK GNU C++17 TESTS 21 61 3788800
130259453 wr316635858 G Sept. 29, 2021, 11:45 a.m. OK GNU C++17 TESTS 21 61 3788800
130287634 0x24 G Sept. 29, 2021, 4:48 p.m. OK GNU C++17 TESTS 21 61 3891200
130245209 dfzgcj G Sept. 29, 2021, 8:54 a.m. OK GNU C++17 TESTS 21 61 3891200
130225246 Irene G Sept. 29, 2021, 4:05 a.m. OK GNU C++17 TESTS 21 61 4915200
130242877 foreverSeven G Sept. 29, 2021, 8:27 a.m. OK GNU C++17 TESTS 21 61 7782400
130312921 fishcathu. G Sept. 30, 2021, 3:08 a.m. OK GNU C++17 TESTS 21 62 3788800
130312842 fishcathu. G Sept. 30, 2021, 3:06 a.m. OK GNU C++17 TESTS 21 62 3788800
130274374 qpEDop_MuXauJloBu4 G Sept. 29, 2021, 2:16 p.m. OK GNU C++17 (64) TESTS 21 46 4300800
130243413 Boboge G Sept. 29, 2021, 8:34 a.m. OK GNU C++17 (64) TESTS 21 46 4300800
130302850 hackcyborg G Sept. 29, 2021, 9:01 p.m. OK GNU C++17 (64) TESTS 21 46 4403200
130298303 Uppercase G Sept. 29, 2021, 7:20 p.m. OK GNU C++17 (64) TESTS 21 46 4403200
130248687 elizavetaa G Sept. 29, 2021, 9:37 a.m. OK GNU C++17 (64) TESTS 21 46 4403200
130245334 yuanyuan2048 G Sept. 29, 2021, 8:56 a.m. OK GNU C++17 (64) TESTS 21 46 4403200
130244034 CCPSDCGK G Sept. 29, 2021, 8:41 a.m. OK GNU C++17 (64) TESTS 21 46 4403200
130239516 agarwala2512 G Sept. 29, 2021, 7:45 a.m. OK GNU C++17 (64) TESTS 21 46 4403200
130224723 shxgun G Sept. 29, 2021, 3:55 a.m. OK GNU C++17 (64) TESTS 21 46 4403200
130314815 woshixiaoxuesheng_ G Sept. 30, 2021, 3:53 a.m. OK GNU C++17 (64) TESTS 21 46 12288000
130315394 sharnit G Sept. 30, 2021, 4:06 a.m. OK Java 11 TESTS 21 343 23756800
130279657 AhmedZ G Sept. 29, 2021, 3:13 p.m. OK Java 11 TESTS 21 685 168755200
130244680 hisenberg01 G Sept. 29, 2021, 8:48 a.m. OK Java 11 TESTS 21 998 161587200
130276426 yuvrajparashar710 G Sept. 29, 2021, 2:37 p.m. OK Java 8 TESTS 21 545 165580800
130281605 Sharon G Sept. 29, 2021, 3:34 p.m. OK Java 8 TESTS 21 997 165478400
130223475 linxiaotian G Sept. 29, 2021, 3:31 a.m. OK Kotlin TESTS 21 826 133017600
130308441 ILMS G Sept. 30, 2021, 12:24 a.m. OK MS C++ 2017 TESTS 21 155 88883200
130236267 SF-Manman G Sept. 29, 2021, 7:05 a.m. OK PyPy 3 TESTS 21 483 28876800
130237120 SF-Manman G Sept. 29, 2021, 7:16 a.m. OK PyPy 3 TESTS 21 498 27238400
130271958 hxu10 G Sept. 29, 2021, 1:53 p.m. OK PyPy 3 TESTS 21 576 30003200
130291036 phantasmpika G Sept. 29, 2021, 5:33 p.m. OK PyPy 3 TESTS 21 982 30515200
130288768 sh1194 G Sept. 29, 2021, 5:04 p.m. OK Python 3 TESTS 21 108 7372800
130289109 sh1194 G Sept. 29, 2021, 5:08 p.m. OK Python 3 TESTS 21 109 7372800
130258602 abhishek32456 G Sept. 29, 2021, 11:36 a.m. OK Python 3 TESTS 21 109 7372800
130311145 190031512_suhana G Sept. 30, 2021, 2:22 a.m. OK Python 3 TESTS 21 124 7372800
130240824 abisheka1441 G Sept. 29, 2021, 8:01 a.m. OK Python 3 TESTS 21 124 7372800
130298357 Spheniscine G Sept. 29, 2021, 7:21 p.m. OK Rust TESTS 21 62 4198400

remove filters

Back to search problems