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 |
---|---|---|---|---|---|---|
1741 | Codeforces Round 826 (Div. 3) | FINISHED | False | 8100 | 66324299 | Oct. 11, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 17858 ) | C | Minimize the Thickness | PROGRAMMING | brute force greedy math two pointers |
B"You are given a sequence a=[a_1,a_2, ... ,a_n] consisting of n positive integers. Let's call a group of consecutive elements a segment. Each segment is characterized by two indices: the index of its left end and the index of its right end. Denote by a[l,r] a segment of the sequence a with the left end in l and the right end in r , i.e. a[l,r]=[a_l, a_{l+1}, ... , a_r] . For example, if a=[31,4,15,92,6,5] , then a[2,5]=[4,15,92,6] , a[5,5]=[6] , a[1,6]=[31,4,15,92,6,5] are segments. We split the given sequence a into segments so that: For example, if a = [ 55,45,30,30,40,100 ], then such a sequence can be split into three segments: a[1,2]=[55,45] , a[3,5]=[30, 30, 40] , a[6,6]=[100] . Each element belongs to exactly segment, the sum of the elements of each segment is 100 . Let's define thickness of split as the length of the longest segment. For example, the thickness of the split from the example above is 3 . Find the minimum thickness among all possible splits of the given sequence of a into segments in the required way. The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. Each test case is described by two lines. The first line of each test case contains a single integer n ( 1 <= n <= 2000 ) -- the length of the sequence a . The second line of each test case contains exactly n integers: a_1, a_2, ... , a_n ( 1 <= a_i <= 10^6 ) -- elements of the sequence a . It is guaranteed that the sum of n for all test cases does not exceed 2000 . For each test case, output one integer -- the minimum possible thickness of a split of the sequence a into segments. Note that there always exist a split, you can always consider whole sequence as one segment. The split in the first test case is explained in the statement, it can be shown that it is optimal."... |
107908 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
175666604 | chrisfcoder | C | Oct. 11, 2022, 5:20 p.m. | OK | C# 10 | TESTS | 9 | 46 | 409600 | ||
175703652 | singhkrishnajsr143 | C | Oct. 12, 2022, 3:03 a.m. | OK | C# 10 | TESTS | 15 | 109 | 307200 | ||
175707853 | bluemegane | C | Oct. 12, 2022, 4:19 a.m. | OK | C# 8 | TESTS | 15 | 124 | 409600 | ||
175680507 | FatalityNT | C | Oct. 11, 2022, 7:39 p.m. | OK | C# 8 | TESTS | 9 | 140 | 512000 | ||
175698546 | Nondifferentiable | C | Oct. 12, 2022, 1:23 a.m. | OK | Clang++20 Diagnostics | TESTS | 15 | 31 | 8294400 | ||
175665443 | Tnirpps | C | Oct. 11, 2022, 5:12 p.m. | OK | Clang++20 Diagnostics | TESTS | 9 | 46 | 2150400 | ||
175667741 | Abhishek_Tewatia | C | Oct. 11, 2022, 5:29 p.m. | OK | GNU C11 | TESTS | 9 | 31 | 0 | ||
175667156 | XiaoDou | C | Oct. 11, 2022, 5:24 p.m. | OK | GNU C11 | TESTS | 9 | 264 | 96153600 | ||
175695680 | Meet_U_24 | C | Oct. 11, 2022, 11:54 p.m. | OK | GNU C++14 | TESTS | 15 | 0 | 0 | ||
175680788 | Marwan_MohiEldeen | C | Oct. 11, 2022, 7:43 p.m. | OK | GNU C++14 | TESTS | 9 | 0 | 0 | ||
175656870 | AKG_001 | C | Oct. 11, 2022, 4:41 p.m. | OK | GNU C++14 | TESTS | 9 | 0 | 0 | ||
175656130 | luoen | C | Oct. 11, 2022, 4:39 p.m. | OK | GNU C++14 | TESTS | 9 | 0 | 0 | ||
175710383 | hahahaha0123 | C | Oct. 12, 2022, 5:01 a.m. | OK | GNU C++14 | TESTS | 15 | 0 | 0 | ||
175702125 | fytftyf | C | Oct. 12, 2022, 2:37 a.m. | OK | GNU C++14 | TESTS | 15 | 0 | 0 | ||
175701041 | Keli-add | C | Oct. 12, 2022, 2:16 a.m. | OK | GNU C++14 | TESTS | 15 | 0 | 0 | ||
175696434 | Fantasyli | C | Oct. 12, 2022, 12:20 a.m. | OK | GNU C++14 | TESTS | 15 | 0 | 0 | ||
175682669 | Klaus98 | C | Oct. 11, 2022, 8:10 p.m. | OK | GNU C++14 | TESTS | 9 | 0 | 102400 | ||
175707556 | Revanth3601 | C | Oct. 12, 2022, 4:13 a.m. | OK | GNU C++14 | TESTS | 15 | 0 | 102400 | ||
175685064 | Ghost_RNA | C | Oct. 11, 2022, 8:47 p.m. | OK | GNU C++17 | TESTS | 9 | 0 | 0 | ||
175684466 | hridyanshverma | C | Oct. 11, 2022, 8:37 p.m. | OK | GNU C++17 | TESTS | 9 | 0 | 0 | ||
175683438 | HarryJPotter | C | Oct. 11, 2022, 8:21 p.m. | OK | GNU C++17 | TESTS | 9 | 0 | 0 | ||
175682537 | baked_potato | C | Oct. 11, 2022, 8:08 p.m. | OK | GNU C++17 | TESTS | 9 | 0 | 0 | ||
175708145 | Xerxes_2002 | C | Oct. 12, 2022, 4:24 a.m. | OK | GNU C++17 | TESTS | 15 | 0 | 0 | ||
175678175 | Miguel141592 | C | Oct. 11, 2022, 7:09 p.m. | OK | GNU C++17 | TESTS | 9 | 0 | 0 | ||
175677683 | Aaravjn | C | Oct. 11, 2022, 7:04 p.m. | OK | GNU C++17 | TESTS | 9 | 0 | 0 | ||
175674068 | S.Zahra | C | Oct. 11, 2022, 6:26 p.m. | OK | GNU C++17 | TESTS | 9 | 0 | 0 | ||
175682259 | Coder_Shan_2001 | C | Oct. 11, 2022, 8:03 p.m. | OK | GNU C++17 | TESTS | 9 | 0 | 0 | ||
175685717 | JPMM | C | Oct. 11, 2022, 8:59 p.m. | OK | GNU C++17 | TESTS | 9 | 0 | 0 | ||
175710611 | sozol | C | Oct. 12, 2022, 5:05 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
175715849 | alif_cse_ju | C | Oct. 12, 2022, 5:57 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
175713811 | lament_Ly | C | Oct. 12, 2022, 5:31 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
175713124 | Fan_zf | C | Oct. 12, 2022, 5:22 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
175703779 | kannuagrawal | C | Oct. 12, 2022, 3:06 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
175700452 | aditya_yadav | C | Oct. 12, 2022, 2:03 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
175699340 | enslaved | C | Oct. 12, 2022, 1:40 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 0 | 0 | ||
175687709 | whatisthis132 | C | Oct. 11, 2022, 9:38 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 0 | 0 | ||
175674789 | TsotneSC | C | Oct. 11, 2022, 6:33 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 0 | 0 | ||
175671279 | Chime | C | Oct. 11, 2022, 5:59 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 0 | 0 | ||
175712688 | OnlyDeniko | C | Oct. 12, 2022, 5:16 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 0 | ||
175712248 | IIIIndex | C | Oct. 12, 2022, 5:11 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 0 | ||
175709634 | nirmalgovindaraj | C | Oct. 12, 2022, 4:50 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 0 | ||
175709481 | wa_maker | C | Oct. 12, 2022, 4:48 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 0 | ||
175709298 | utkarshag_20 | C | Oct. 12, 2022, 4:45 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 0 | ||
175708777 | TranLoc | C | Oct. 12, 2022, 4:36 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 0 | ||
175708236 | pankajrana0112 | C | Oct. 12, 2022, 4:26 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 0 | ||
175708191 | harmanboparai | C | Oct. 12, 2022, 4:25 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 0 | ||
175713425 | _Absurd_ | C | Oct. 12, 2022, 5:26 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 0 | ||
175715178 | abhijeet_x201 | C | Oct. 12, 2022, 5:50 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 0 | 0 | ||
175712497 | guotajiaman | C | Oct. 12, 2022, 5:14 a.m. | OK | Java 11 | TESTS | 15 | 155 | 0 | ||
175706160 | butters0521 | C | Oct. 12, 2022, 3:48 a.m. | OK | Java 11 | TESTS | 15 | 156 | 0 | ||
175697980 | SpookyJumpyBeans | C | Oct. 12, 2022, 1:10 a.m. | OK | Java 11 | TESTS | 15 | 156 | 0 | ||
175695906 | Sandy_coder2001 | C | Oct. 12, 2022, 12:02 a.m. | OK | Java 11 | TESTS | 15 | 156 | 0 | ||
175705993 | djrfrn | C | Oct. 12, 2022, 3:45 a.m. | OK | Java 11 | TESTS | 15 | 170 | 0 | ||
175681547 | mk_0380 | C | Oct. 11, 2022, 7:54 p.m. | OK | Java 11 | TESTS | 9 | 170 | 0 | ||
175704473 | rajan44chauhan | C | Oct. 12, 2022, 3:17 a.m. | OK | Java 11 | TESTS | 15 | 171 | 0 | ||
175698938 | rajneesh.osho | C | Oct. 12, 2022, 1:31 a.m. | OK | Java 11 | TESTS | 15 | 171 | 0 | ||
175697460 | KarMa_ | C | Oct. 12, 2022, 12:54 a.m. | OK | Java 11 | TESTS | 15 | 171 | 0 | ||
175696202 | theSSS | C | Oct. 12, 2022, 12:12 a.m. | OK | Java 11 | TESTS | 15 | 171 | 0 | ||
175656222 | agarwalmanas212001 | C | Oct. 11, 2022, 4:39 p.m. | OK | Java 17 | TESTS | 9 | 155 | 0 | ||
175656558 | HarshChourasiya | C | Oct. 11, 2022, 4:40 p.m. | OK | Java 17 | TESTS | 9 | 155 | 204800 | ||
175662141 | alexis779 | C | Oct. 11, 2022, 4:53 p.m. | OK | Java 17 | TESTS | 9 | 186 | 102400 | ||
175702269 | pili | C | Oct. 12, 2022, 2:40 a.m. | OK | Java 17 | TESTS | 15 | 187 | 614400 | ||
175712075 | gaurav_22 | C | Oct. 12, 2022, 5:08 a.m. | OK | Java 17 | TESTS | 15 | 187 | 716800 | ||
175679328 | PallabSaha23 | C | Oct. 11, 2022, 7:23 p.m. | OK | Java 17 | TESTS | 9 | 187 | 819200 | ||
175680177 | ukr2002 | C | Oct. 11, 2022, 7:35 p.m. | OK | Java 17 | TESTS | 9 | 187 | 1024000 | ||
175696231 | IceWolf898 | C | Oct. 12, 2022, 12:13 a.m. | OK | Java 17 | TESTS | 15 | 202 | 716800 | ||
175683836 | harsh.bhandari.v | C | Oct. 11, 2022, 8:27 p.m. | OK | Java 17 | TESTS | 9 | 217 | 307200 | ||
175679117 | Dukkha | C | Oct. 11, 2022, 7:21 p.m. | OK | Java 17 | TESTS | 9 | 218 | 204800 | ||
175702617 | Ibrahimovic_The_Lion | C | Oct. 12, 2022, 2:46 a.m. | OK | Java 8 | TESTS | 15 | 93 | 0 | ||
175702563 | khan1121 | C | Oct. 12, 2022, 2:45 a.m. | OK | Java 8 | TESTS | 15 | 93 | 0 | ||
175702538 | frey4 | C | Oct. 12, 2022, 2:44 a.m. | OK | Java 8 | TESTS | 15 | 93 | 0 | ||
175686090 | Abdallah_Ragab00 | C | Oct. 11, 2022, 9:06 p.m. | OK | Java 8 | TESTS | 9 | 93 | 0 | ||
175677372 | mohamedhassan_c | C | Oct. 11, 2022, 7 p.m. | OK | Java 8 | TESTS | 9 | 93 | 0 | ||
175675496 | ahmedtawfik | C | Oct. 11, 2022, 6:41 p.m. | OK | Java 8 | TESTS | 9 | 93 | 0 | ||
175667331 | bhaveshd | C | Oct. 11, 2022, 5:26 p.m. | OK | Java 8 | TESTS | 9 | 93 | 0 | ||
175665173 | hzwisaboy | C | Oct. 11, 2022, 5:10 p.m. | OK | Java 8 | TESTS | 9 | 93 | 0 | ||
175663367 | raj_shahh | C | Oct. 11, 2022, 4:59 p.m. | OK | Java 8 | TESTS | 9 | 93 | 0 | ||
175659542 | Diaa12360 | C | Oct. 11, 2022, 4:47 p.m. | OK | Java 8 | TESTS | 9 | 93 | 0 | ||
175699711 | Gao_zhenchuan | C | Oct. 12, 2022, 1:49 a.m. | OK | MS C++ 2017 | TESTS | 15 | 15 | 0 | ||
175699097 | LiuZhaocheng | C | Oct. 12, 2022, 1:35 a.m. | OK | MS C++ 2017 | TESTS | 15 | 15 | 0 | ||
175676203 | Mirali7 | C | Oct. 11, 2022, 6:48 p.m. | OK | MS C++ 2017 | TESTS | 9 | 15 | 0 | ||
175702819 | ThreeTB | C | Oct. 12, 2022, 2:49 a.m. | OK | MS C++ 2017 | TESTS | 15 | 15 | 102400 | ||
175682055 | skimono | C | Oct. 11, 2022, 8:01 p.m. | OK | MS C++ 2017 | TESTS | 9 | 31 | 0 | ||
175662878 | turz0ahsan | C | Oct. 11, 2022, 4:56 p.m. | OK | Node.js | TESTS | 9 | 62 | 409600 | ||
175713491 | Awdda | C | Oct. 12, 2022, 5:27 a.m. | OK | PyPy 3 | TESTS | 15 | 93 | 2150400 | ||
175669789 | lullabies777 | C | Oct. 11, 2022, 5:46 p.m. | OK | PyPy 3 | TESTS | 9 | 93 | 2150400 | ||
175672530 | abcsumit | C | Oct. 11, 2022, 6:11 p.m. | OK | PyPy 3 | TESTS | 9 | 93 | 2662400 | ||
175660548 | andrey.starodubtsev | C | Oct. 11, 2022, 4:48 p.m. | OK | PyPy 3 | TESTS | 9 | 93 | 2867200 | ||
175663624 | segfault11 | C | Oct. 11, 2022, 5 p.m. | OK | PyPy 3 | TESTS | 9 | 93 | 3072000 | ||
175659308 | sw_enthusiast | C | Oct. 11, 2022, 4:46 p.m. | OK | PyPy 3 | TESTS | 9 | 93 | 67379200 | ||
175676221 | sheshank10 | C | Oct. 11, 2022, 6:48 p.m. | OK | PyPy 3 | TESTS | 9 | 108 | 1843200 | ||
175687091 | hxu10 | C | Oct. 11, 2022, 9:26 p.m. | OK | PyPy 3 | TESTS | 9 | 108 | 2048000 | ||
175671565 | Utkarshg001 | C | Oct. 11, 2022, 6:02 p.m. | OK | PyPy 3 | TESTS | 9 | 108 | 2150400 | ||
175684917 | Abdalkhalig | C | Oct. 11, 2022, 8:45 p.m. | OK | PyPy 3 | TESTS | 9 | 108 | 2252800 | ||
175680297 | biglunchdude | C | Oct. 11, 2022, 7:36 p.m. | OK | PyPy 3-64 | TESTS | 9 | 46 | 1945600 | ||
175699032 | bokunopicolo | C | Oct. 12, 2022, 1:33 a.m. | OK | PyPy 3-64 | TESTS | 15 | 61 | 2150400 | ||
175662288 | maraj262000 | C | Oct. 11, 2022, 4:54 p.m. | OK | PyPy 3-64 | TESTS | 9 | 61 | 2150400 | ||
175684446 | Sir.RoiS | C | Oct. 11, 2022, 8:37 p.m. | OK | PyPy 3-64 | TESTS | 9 | 62 | 1843200 | ||
175688560 | hitthheerree | C | Oct. 11, 2022, 9:56 p.m. | OK | PyPy 3-64 | TESTS | 9 | 62 | 1945600 | ||
175671882 | mrdhnv | C | Oct. 11, 2022, 6:05 p.m. | OK | PyPy 3-64 | TESTS | 9 | 62 | 1945600 | ||
175657933 | PaJlaT228PACTBOPOB | C | Oct. 11, 2022, 4:43 p.m. | OK | PyPy 3-64 | TESTS | 9 | 62 | 1945600 | ||
175677042 | algo.frvr.ru | C | Oct. 11, 2022, 6:56 p.m. | OK | PyPy 3-64 | TESTS | 9 | 62 | 2048000 | ||
175665425 | Maskur_ICT_MBSTU | C | Oct. 11, 2022, 5:12 p.m. | OK | PyPy 3-64 | TESTS | 9 | 62 | 2150400 | ||
175676508 | IllegalRazer | C | Oct. 11, 2022, 6:51 p.m. | OK | PyPy 3-64 | TESTS | 9 | 62 | 2560000 | ||
175709567 | Dinesh_devanaboina | C | Oct. 12, 2022, 4:49 a.m. | OK | Python 3 | TESTS | 15 | 31 | 0 | ||
175664503 | Dinesh_devanaboina | C | Oct. 11, 2022, 5:05 p.m. | OK | Python 3 | TESTS | 9 | 31 | 0 | ||
175659993 | zl2889 | C | Oct. 11, 2022, 4:47 p.m. | OK | Python 3 | TESTS | 9 | 31 | 0 | ||
175710410 | Virus47 | C | Oct. 12, 2022, 5:02 a.m. | OK | Python 3 | TESTS | 15 | 46 | 0 | ||
175706649 | DhirishalaLavanya | C | Oct. 12, 2022, 3:57 a.m. | OK | Python 3 | TESTS | 15 | 46 | 0 | ||
175703839 | juandavidarce | C | Oct. 12, 2022, 3:07 a.m. | OK | Python 3 | TESTS | 15 | 46 | 0 | ||
175674284 | devsharma03 | C | Oct. 11, 2022, 6:28 p.m. | OK | Python 3 | TESTS | 9 | 46 | 0 | ||
175672740 | lucifer_delco | C | Oct. 11, 2022, 6:13 p.m. | OK | Python 3 | TESTS | 9 | 46 | 0 | ||
175672563 | abcsumit | C | Oct. 11, 2022, 6:12 p.m. | OK | Python 3 | TESTS | 9 | 46 | 0 | ||
175671065 | Priyansh_23May | C | Oct. 11, 2022, 5:57 p.m. | OK | Python 3 | TESTS | 9 | 46 | 0 | ||
175655665 | mfeds | C | Oct. 11, 2022, 4:38 p.m. | OK | Rust 2021 | TESTS | 9 | 0 | 0 | ||
175703025 | Ragib_Hasin | C | Oct. 12, 2022, 2:53 a.m. | OK | Rust 2021 | TESTS | 15 | 15 | 102400 | ||
175661446 | avnyu | C | Oct. 11, 2022, 4:51 p.m. | OK | Rust 2021 | TESTS | 9 | 15 | 204800 |
Back to search problems