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 |
---|---|---|---|---|---|---|
1616 | Good Bye 2021: 2022 is NEAR | FINISHED | False | 7200 | 96474263 | Dec. 29, 2021, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 5005 ) | D | Keep the Average High | PROGRAMMING | dp greedy math | 2000 |
B"You are given an array of integers a_1, a_2, ldots, a_n and an integer x . You need to select the maximum number of elements in the array, such that for every subsegment a_l, a_{l + 1}, ldots, a_r containing strictly more than one element (l < r) , either: The first line of input contains one integer t ( 1 <= q t <= q 10 ): the number of test cases. The descriptions of t test cases follow, three lines per test case. In the first line you are given one integer n ( 1 <= q n <= q 50 ,000 ): the number of integers in the array. The second line contains n integers a_1, a_2, ldots, a_n ( -100 ,000 <= q a_i <= q 100 ,000 ). The third line contains one integer x ( -100 ,000 <= q x <= q 100 ,000 ). For each test case, print one integer: the maximum number of elements that you can select. In the first example, one valid way to select the elements is [ underline{1}, 2, underline{3}, underline{4}, underline{5}] . All subsegments satisfy at least one of the criteria. For example, for the subsegment l = 1 , r = 2 we have that the element 2 is not selected, satisfying the first criterion. For the subsegment l = 3 , r = 5 we have 3 + 4 + 5 = 12 ge 2 cdot 3 , satisfying the second criterion. We can't select all elements, because in this case for l = 1 , r = 2 all elements are selected and we have a_1 + a_2 = 3 < 2 cdot 2 . Thus, the maximum number of selected elements is 4 . In the second example, one valid solution is [ underline{2}, underline{4}, 2, underline{4}, underline{2}, underline{4}, 2, underline{4}, underline{2}, underline{4}] . In the third example, one valid solution is [ underline{-10}, -5, underline{-10}] . In the fourth example, one valid solution is [ underline{9}, underline{9}, -3] . "... |
Good Bye 2021 -- Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
141165890 | rainboy | D | Dec. 30, 2021, 1:38 p.m. | OK | GNU C11 | TESTS | 9 | 77 | 204800 | 2000 | |
141202812 | saker.hajji | D | Dec. 30, 2021, 11:16 p.m. | OK | GNU C11 | TESTS | 9 | 78 | 204800 | 2000 | |
141195164 | kennyboi | D | Dec. 30, 2021, 7:38 p.m. | OK | GNU C++14 | TESTS | 9 | 108 | 409600 | 2000 | |
141135698 | meyi | D | Dec. 29, 2021, 7 p.m. | OK | GNU C++14 | TESTS | 9 | 108 | 819200 | 2000 | |
141183711 | MohammadHijaz | D | Dec. 30, 2021, 5:03 p.m. | OK | GNU C++14 | TESTS | 9 | 109 | 204800 | 2000 | |
141130516 | ver1tas | D | Dec. 29, 2021, 6:11 p.m. | OK | GNU C++14 | TESTS | 8 | 109 | 204800 | 2000 | |
141194185 | saurabh1 | D | Dec. 30, 2021, 7:20 p.m. | OK | GNU C++14 | TESTS | 9 | 109 | 204800 | 2000 | |
141191511 | saurabh1 | D | Dec. 30, 2021, 6:40 p.m. | OK | GNU C++14 | TESTS | 9 | 109 | 204800 | 2000 | |
141141545 | wushi555 | D | Dec. 30, 2021, 9:13 a.m. | OK | GNU C++14 | TESTS | 9 | 109 | 409600 | 2000 | |
141170893 | 342zhuyongqi | D | Dec. 30, 2021, 2:28 p.m. | OK | GNU C++14 | TESTS | 9 | 109 | 409600 | 2000 | |
141159170 | akatsuki19 | D | Dec. 30, 2021, 12:25 p.m. | OK | GNU C++14 | TESTS | 9 | 109 | 512000 | 2000 | |
141186669 | aaforce202 | D | Dec. 30, 2021, 5:39 p.m. | OK | GNU C++14 | TESTS | 9 | 109 | 614400 | 2000 | |
141146783 | proverbs1_7 | D | Dec. 30, 2021, 10:17 a.m. | OK | GNU C++17 | TESTS | 9 | 78 | 204800 | 2000 | |
141171341 | ericxu0 | D | Dec. 30, 2021, 2:33 p.m. | OK | GNU C++17 | TESTS | 9 | 108 | 204800 | 2000 | |
141168731 | Ayush_Anand_Tripathi | D | Dec. 30, 2021, 2:07 p.m. | OK | GNU C++17 | TESTS | 9 | 108 | 409600 | 2000 | |
141196337 | nishit.sharma | D | Dec. 30, 2021, 8 p.m. | OK | GNU C++17 | TESTS | 9 | 108 | 409600 | 2000 | |
141184265 | MNnazrul | D | Dec. 30, 2021, 5:10 p.m. | OK | GNU C++17 | TESTS | 9 | 108 | 512000 | 2000 | |
141171006 | __Shioko | D | Dec. 30, 2021, 2:29 p.m. | OK | GNU C++17 | TESTS | 9 | 108 | 614400 | 2000 | |
141206000 | SOWFELICITY | D | Dec. 31, 2021, 1:36 a.m. | OK | GNU C++17 | TESTS | 9 | 108 | 614400 | 2000 | |
141171994 | sachin_ji | D | Dec. 30, 2021, 2:41 p.m. | OK | GNU C++17 | TESTS | 9 | 108 | 1536000 | 2000 | |
141166079 | dacoon | D | Dec. 30, 2021, 1:40 p.m. | OK | GNU C++17 | TESTS | 9 | 108 | 2867200 | 2000 | |
141176200 | HKvv | D | Dec. 30, 2021, 3:31 p.m. | OK | GNU C++17 | TESTS | 9 | 108 | 7987200 | 2000 | |
141190562 | dgupta0812 | D | Dec. 30, 2021, 6:27 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 61 | 204800 | 2000 | |
141191436 | dgupta0812 | D | Dec. 30, 2021, 6:39 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 62 | 204800 | 2000 | |
141168989 | korokseeds | D | Dec. 30, 2021, 2:10 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 62 | 409600 | 2000 | |
141131349 | MatsuTaku | D | Dec. 29, 2021, 6:17 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 614400 | 2000 | |
141198276 | happymood | D | Dec. 30, 2021, 8:40 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 62 | 819200 | 2000 | |
141176004 | Saimun_Islam | D | Dec. 30, 2021, 3:28 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 62 | 819200 | 2000 | |
141167280 | Codurr | D | Dec. 30, 2021, 1:53 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 62 | 1228800 | 2000 | |
141198358 | knon0501 | D | Dec. 30, 2021, 8:42 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 62 | 3174400 | 2000 | |
141153008 | ymjer | D | Dec. 30, 2021, 11:21 a.m. | OK | GNU C++17 (64) | TESTS | 9 | 62 | 7270400 | 2000 | |
141173942 | GeorgeMaharis | D | Dec. 30, 2021, 3:04 p.m. | OK | GNU C++17 (64) | TESTS | 9 | 77 | 204800 | 2000 | |
141135120 | fvogel | D | Dec. 29, 2021, 6:53 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 46 | 204800 | 2000 | |
141171126 | geospiza | D | Dec. 30, 2021, 2:31 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 46 | 204800 | 2000 | |
141154565 | _Body | D | Dec. 30, 2021, 11:36 a.m. | OK | GNU C++20 (64) | TESTS | 9 | 46 | 409600 | 2000 | |
141170538 | NTU_Rev | D | Dec. 30, 2021, 2:24 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 46 | 3993600 | 2000 | |
141152932 | shivaram_22 | D | Dec. 30, 2021, 11:20 a.m. | OK | GNU C++20 (64) | TESTS | 9 | 61 | 409600 | 2000 | |
141141788 | baddog | D | Dec. 30, 2021, 9:16 a.m. | OK | GNU C++20 (64) | TESTS | 9 | 61 | 819200 | 2000 | |
141172227 | Dipankar_Kumar_Singh | D | Dec. 30, 2021, 2:44 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 61 | 819200 | 2000 | |
141209119 | A15473887 | D | Dec. 31, 2021, 3:30 a.m. | OK | GNU C++20 (64) | TESTS | 9 | 61 | 1024000 | 2000 | |
141135337 | pavlovoleg4889 | D | Dec. 29, 2021, 6:56 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 61 | 3174400 | 2000 | |
141191122 | cosenza | D | Dec. 30, 2021, 6:34 p.m. | OK | GNU C++20 (64) | TESTS | 9 | 62 | 204800 | 2000 | |
141213301 | dofecorces | D | Dec. 31, 2021, 5:12 a.m. | OK | Haskell | TESTS | 9 | 93 | 3174400 | 2000 | |
141190887 | RainLiOfficial | D | Dec. 30, 2021, 6:31 p.m. | OK | Java 11 | TESTS | 9 | 170 | 0 | 2000 | |
141187520 | RainLiOfficial | D | Dec. 30, 2021, 5:49 p.m. | OK | Java 11 | TESTS | 9 | 171 | 0 | 2000 | |
141186389 | pras7946 | D | Dec. 30, 2021, 5:36 p.m. | OK | Java 11 | TESTS | 9 | 233 | 0 | 2000 | |
141173505 | Restricted | D | Dec. 30, 2021, 2:59 p.m. | OK | Java 11 | TESTS | 9 | 248 | 0 | 2000 | |
141175972 | SaberXpro | D | Dec. 30, 2021, 3:28 p.m. | OK | Java 11 | TESTS | 9 | 249 | 0 | 2000 | |
141174144 | mayank.singh19 | D | Dec. 30, 2021, 3:06 p.m. | OK | Java 11 | TESTS | 9 | 249 | 0 | 2000 | |
141172831 | Restricted | D | Dec. 30, 2021, 2:51 p.m. | OK | Java 11 | TESTS | 9 | 264 | 0 | 2000 | |
141209313 | CCS_Covenant | D | Dec. 31, 2021, 3:35 a.m. | OK | Java 11 | TESTS | 9 | 265 | 0 | 2000 | |
141133648 | LongWalk | D | Dec. 29, 2021, 6:37 p.m. | OK | Java 11 | TESTS | 9 | 280 | 0 | 2000 | |
141157539 | merlin_ | D | Dec. 30, 2021, 12:08 p.m. | OK | Java 11 | TESTS | 9 | 311 | 0 | 2000 | |
141195989 | Adi_7861 | D | Dec. 30, 2021, 7:53 p.m. | OK | Java 8 | TESTS | 9 | 109 | 0 | 2000 | |
141175111 | anonxx5 | D | Dec. 30, 2021, 3:17 p.m. | OK | Java 8 | TESTS | 9 | 171 | 0 | 2000 | |
141148354 | brikri | D | Dec. 30, 2021, 10:35 a.m. | OK | Java 8 | TESTS | 9 | 171 | 0 | 2000 | |
141135383 | fetetriste | D | Dec. 29, 2021, 6:56 p.m. | OK | Java 8 | TESTS | 9 | 171 | 0 | 2000 | |
141161184 | prem_cse | D | Dec. 30, 2021, 12:47 p.m. | OK | Java 8 | TESTS | 9 | 186 | 0 | 2000 | |
141204170 | invincible777 | D | Dec. 31, 2021, 12:19 a.m. | OK | Java 8 | TESTS | 9 | 187 | 0 | 2000 | |
141201266 | 2020akadaver | D | Dec. 30, 2021, 10:10 p.m. | OK | Java 8 | TESTS | 9 | 187 | 0 | 2000 | |
141176003 | anonxx5 | D | Dec. 30, 2021, 3:28 p.m. | OK | Java 8 | TESTS | 9 | 202 | 0 | 2000 | |
141133815 | AndreySiunov | D | Dec. 29, 2021, 6:39 p.m. | OK | Java 8 | TESTS | 9 | 233 | 0 | 2000 | |
141188937 | fatant | D | Dec. 30, 2021, 6:06 p.m. | OK | MS C++ 2017 | TESTS | 9 | 405 | 409600 | 2000 | |
141181133 | you1234 | D | Dec. 30, 2021, 4:32 p.m. | OK | PyPy 2 | TESTS | 9 | 140 | 15974400 | 2000 | |
141130290 | legend.ary_as | D | Dec. 29, 2021, 6:10 p.m. | OK | PyPy 3 | TESTS | 8 | 218 | 22732800 | 2000 | |
141129934 | dynamic-26 | D | Dec. 29, 2021, 6:08 p.m. | OK | PyPy 3 | TESTS | 8 | 218 | 22732800 | 2000 | |
141133252 | legend.ary_as | D | Dec. 29, 2021, 6:33 p.m. | OK | PyPy 3 | TESTS | 8 | 264 | 19865600 | 2000 | |
141176051 | Anusha__123 | D | Dec. 30, 2021, 3:29 p.m. | OK | PyPy 3 | TESTS | 9 | 389 | 12390400 | 2000 | |
141131944 | codicon | D | Dec. 29, 2021, 6:22 p.m. | OK | PyPy 3 | TESTS | 8 | 389 | 17817600 | 2000 | |
141153001 | nexusmind | D | Dec. 30, 2021, 11:21 a.m. | OK | PyPy 3 | TESTS | 9 | 405 | 12083200 | 2000 | |
141211216 | ice11667 | D | Dec. 31, 2021, 4:26 a.m. | OK | PyPy 3 | TESTS | 9 | 436 | 12697600 | 2000 | |
141179342 | _MADARA_ | D | Dec. 30, 2021, 4:10 p.m. | OK | PyPy 3-64 | TESTS | 9 | 187 | 23244800 | 2000 | |
141211633 | cocopalm | D | Dec. 31, 2021, 4:37 a.m. | OK | PyPy 3-64 | TESTS | 9 | 436 | 27750400 | 2000 | |
141132662 | Megurine | D | Dec. 29, 2021, 6:28 p.m. | OK | PyPy 3-64 | TESTS | 8 | 467 | 14848000 | 2000 | |
141202463 | yupooh | D | Dec. 30, 2021, 11:02 p.m. | OK | PyPy 3-64 | TESTS | 9 | 498 | 43110400 | 2000 | |
141132847 | Megurine | D | Dec. 29, 2021, 6:29 p.m. | OK | PyPy 3-64 | TESTS | 8 | 499 | 14336000 | 2000 | |
141155597 | nicku123 | D | Dec. 30, 2021, 11:47 a.m. | OK | PyPy 3-64 | TESTS | 9 | 639 | 17510400 | 2000 | |
141130275 | nwi | D | Dec. 29, 2021, 6:10 p.m. | OK | Python 2 | TESTS | 8 | 280 | 3276800 | 2000 | |
141204321 | bronze_coder | D | Dec. 31, 2021, 12:26 a.m. | OK | Python 3 | TESTS | 9 | 701 | 6246400 | 2000 | |
141204654 | bronze_coder | D | Dec. 31, 2021, 12:40 a.m. | OK | Python 3 | TESTS | 9 | 1044 | 6246400 | 2000 | |
141179903 | O0oo0Oo0OO0O0 | D | Dec. 30, 2021, 4:16 p.m. | OK | Rust 2021 | TESTS | 9 | 30 | 409600 | 2000 | |
141192205 | qwerty787788 | D | Dec. 30, 2021, 6:50 p.m. | OK | Rust 2021 | TESTS | 9 | 77 | 409600 | 2000 | |
141131986 | kumalimak | D | Dec. 29, 2021, 6:22 p.m. | OK | Rust 2021 | TESTS | 8 | 155 | 8396800 | 2000 | |
141194049 | clause | D | Dec. 30, 2021, 7:18 p.m. | OK | Rust 2021 | TESTS | 9 | 171 | 819200 | 2000 |
Back to search problems