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 |
|---|---|---|---|---|---|---|
| 2224 | Codeforces Round 1097 (Div. 2, Based on Zhili Cup 2026) | FINISHED | False | 9000 | 2418896 | May 6, 2026, 6:05 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 10144 ) | A | Zhily and Array Operating | PROGRAMMING | constructive algorithms greedy |
Deep in the wilderness, Zhily and Jily discovered a series of gathering places that contain abstract logic. Some of these gathering places harbor inconsistent errors in their logic, which may collapse at any moment. They hope to transmit logic between adjacent gathering places through reasonable transfer arrangements so that as many gathering places as possible can eventually restore logical stability. You are given an array (a) of (n) integers. You can perform the following operation any number of times: Choose an index (i) ((1 \le i \lt n)) and assign (a_i\gets a_i+a_{i+1}). Each index can be chosen at most once . Find the maximum number of positive integers in the final array after all operations. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of each test case contains a single integer (n) ((2\leq n \leq 2\cdot 10^5)). The second line of each test case contains (n) integers (a_1,a_2,\ldots,a_n) ((-10^9\leq a_i\leq 10^9)). It is guaranteed that the sum of (n) over all test cases does not exceed (2\cdot10^5). For each test case, you should output a single line containing an integer (k), the number of positive numbers in the final sequence. In the first test case, the array (a) is operated on by the following process: (0,-1,3,-3,0\to 0,\color{red}{2},3,-3,0\to \color{red}{2},2,3,-3,0). There are (3) positive numbers in the final array, and it can be proven that this is the maximum count of positive integers. In the second test case, the final array can be:(4,4,6,5,3), which is operated on by the following process: (0,-2,1,2,3\to 0,-2,1,\color{red}{5},3\to 0,-2,\color{red}{6},5,3\to 0,\color{red}{4},6,5,3\to \color{red}{4},4,6,5,3). In the third test case, the final array can be:(1,1,1,1,0), which is operated on by the following p |
| Codeforces Round 1097 (Div. 1, Div2, Based on Zhili Cup 2026) Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 373676637 | sasafied | A | May 6, 2026, 7:22 a.m. | OK | C# 10 | TESTS | 4 | 78 | 1740800 | ||
| 373745212 | Atulya_01 | A | May 6, 2026, 4:40 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 46 | 0 | ||
| 373738026 | sagarpal0402 | A | May 6, 2026, 3:31 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 46 | 0 | ||
| 373734619 | young-lord | A | May 6, 2026, 3:04 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 46 | 0 | ||
| 373722844 | chetanahuja175 | A | May 6, 2026, 1:24 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 46 | 0 | ||
| 373721965 | Bayrtuvshin | A | May 6, 2026, 1:18 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 46 | 0 | ||
| 373715141 | stepheneleven | A | May 6, 2026, 12:23 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 46 | 0 | ||
| 373714460 | ArtistByDay_LokiByNight | A | May 6, 2026, 12:17 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 46 | 0 | ||
| 373691771 | vsrupeshkumar. | A | May 6, 2026, 8:32 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 46 | 0 | ||
| 373683295 | Habib.61 | A | May 6, 2026, 7:54 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 46 | 0 | ||
| 373767056 | saurabhdamle8 | A | May 6, 2026, 10:46 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 46 | 102400 | ||
| 373714147 | inter_state | A | May 6, 2026, 12:15 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 31 | 0 | ||
| 373783830 | anilkumar_tk | A | May 7, 2026, 5:58 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 46 | 0 | ||
| 373781989 | orgiltsogt | A | May 7, 2026, 5:27 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 46 | 0 | ||
| 373760112 | abuzir | A | May 6, 2026, 7:46 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 46 | 0 | ||
| 373752771 | Pedrinho_Eu | A | May 6, 2026, 5:58 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 46 | 0 | ||
| 373750038 | Segcolt | A | May 6, 2026, 5:30 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 46 | 0 | ||
| 373749227 | M0rtAl_ | A | May 6, 2026, 5:23 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 46 | 0 | ||
| 373747703 | aaaas | A | May 6, 2026, 5:06 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 46 | 0 | ||
| 373742714 | Joe_son | A | May 6, 2026, 4:16 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 46 | 0 | ||
| 373742534 | sandeepOG | A | May 6, 2026, 4:14 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 46 | 0 | ||
| 373756716 | IHateTLE | A | May 6, 2026, 6:46 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 31 | 0 | ||
| 373753917 | 128914122 | A | May 6, 2026, 6:10 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 31 | 0 | ||
| 373735123 | randomboi404 | A | May 6, 2026, 3:08 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 31 | 0 | ||
| 373732480 | Yunbengyu | A | May 6, 2026, 2:46 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 31 | 0 | ||
| 373721791 | Divs30 | A | May 6, 2026, 1:16 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 31 | 0 | ||
| 373710314 | xuzhaojie | A | May 6, 2026, 11:43 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 31 | 0 | ||
| 373708508 | Nour_Alaa | A | May 6, 2026, 11:26 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 31 | 0 | ||
| 373708156 | Sayor1 | A | May 6, 2026, 11:23 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 31 | 0 | ||
| 373703216 | TheLittleDye | A | May 6, 2026, 10:29 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 31 | 0 | ||
| 373677323 | poijjk--0 | A | May 6, 2026, 7:25 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 4 | 31 | 0 | ||
| 373712524 | K-Squared | A | May 6, 2026, 12:01 p.m. | OK | GNU C11 | TESTS | 4 | 62 | 1536000 | ||
| 373775512 | deepak3007_ | A | May 7, 2026, 3:12 a.m. | OK | GNU C11 | TESTS | 4 | 78 | 1638400 | ||
| 373686188 | LuyaoZhang | A | May 6, 2026, 8:08 a.m. | OK | GNU C11 | TESTS | 4 | 93 | 1433600 | ||
| 373734711 | Nazia_Hasan | A | May 6, 2026, 3:04 p.m. | OK | GNU C11 | TESTS | 4 | 93 | 1638400 | ||
| 373698931 | SarthakJiDubey | A | May 6, 2026, 9:41 a.m. | OK | GNU C11 | TESTS | 4 | 93 | 3174400 | ||
| 373685563 | davakachin | A | May 6, 2026, 8:05 a.m. | OK | GNU C11 | TESTS | 4 | 109 | 1536000 | ||
| 373779206 | ryanphransa | A | May 7, 2026, 4:33 a.m. | OK | GNU C11 | TESTS | 4 | 125 | 7987200 | ||
| 373686758 | loveax | A | May 6, 2026, 8:10 a.m. | OK | GNU C11 | TESTS | 4 | 171 | 17715200 | ||
| 373742049 | vedjaw | A | May 6, 2026, 4:09 p.m. | OK | GNU C11 | TESTS | 4 | 218 | 11161600 | ||
| 373752479 | HashMallow | A | May 6, 2026, 5:55 p.m. | OK | Go | TESTS | 4 | 93 | 4198400 | ||
| 373745957 | prajas_004 | A | May 6, 2026, 4:48 p.m. | OK | Go | TESTS | 4 | 125 | 38809600 | ||
| 373751386 | HashMallow | A | May 6, 2026, 5:43 p.m. | OK | Go | TESTS | 4 | 625 | 4608000 | ||
| 373677621 | RakeshKayal | A | May 6, 2026, 7:26 a.m. | OK | Java 21 | TESTS | 4 | 203 | 3788800 | ||
| 373683490 | S0haib | A | May 6, 2026, 7:55 a.m. | OK | Java 21 | TESTS | 4 | 218 | 4608000 | ||
| 373693540 | code_manik | A | May 6, 2026, 8:51 a.m. | OK | Java 21 | TESTS | 4 | 234 | 512000 | ||
| 373756893 | priyaranjanmudliar | A | May 6, 2026, 6:49 p.m. | OK | Java 21 | TESTS | 4 | 234 | 3174400 | ||
| 373676628 | SenCherry | A | May 6, 2026, 7:22 a.m. | OK | Java 21 | TESTS | 4 | 234 | 4505600 | ||
| 373703021 | raunakktiwari42 | A | May 6, 2026, 10:27 a.m. | OK | Java 21 | TESTS | 4 | 234 | 5427200 | ||
| 373783692 | salvatore_7 | A | May 7, 2026, 5:56 a.m. | OK | Java 21 | TESTS | 4 | 250 | 4812800 | ||
| 373709278 | Qzer | A | May 6, 2026, 11:33 a.m. | OK | Java 21 | TESTS | 4 | 250 | 23040000 | ||
| 373701159 | creatineMonohydrate | A | May 6, 2026, 10:05 a.m. | OK | Java 21 | TESTS | 4 | 265 | 4198400 | ||
| 373778699 | shreyansha.ug23.cs | A | May 7, 2026, 4:21 a.m. | OK | Java 21 | TESTS | 4 | 265 | 4505600 | ||
| 373765286 | QZO-PARASAT-BIL | A | May 6, 2026, 9:55 p.m. | OK | Java 8 | TESTS | 4 | 125 | 11980800 | ||
| 373731243 | simran_001 | A | May 6, 2026, 2:35 p.m. | OK | Java 8 | TESTS | 4 | 125 | 15257600 | ||
| 373750636 | nikhil97agra | A | May 6, 2026, 5:37 p.m. | OK | Java 8 | TESTS | 4 | 140 | 12083200 | ||
| 373710018 | jonshrey | A | May 6, 2026, 11:40 a.m. | OK | Java 8 | TESTS | 4 | 359 | 14233600 | ||
| 373732205 | vrishankmanglige12 | A | May 6, 2026, 2:44 p.m. | OK | Java 8 | TESTS | 4 | 375 | 0 | ||
| 373706649 | M_oksh07 | A | May 6, 2026, 11:08 a.m. | OK | Java 8 | TESTS | 4 | 375 | 0 | ||
| 373731308 | Infiniteflux | A | May 6, 2026, 2:36 p.m. | OK | Java 8 | TESTS | 4 | 390 | 0 | ||
| 373693923 | Prathyusha-05 | A | May 6, 2026, 8:54 a.m. | OK | Java 8 | TESTS | 4 | 390 | 0 | ||
| 373783592 | javeed_123 | A | May 7, 2026, 5:54 a.m. | OK | Java 8 | TESTS | 4 | 406 | 0 | ||
| 373695976 | Deshraj_Parmar | A | May 6, 2026, 9:12 a.m. | OK | Java 8 | TESTS | 4 | 421 | 0 | ||
| 373730087 | mrmohancmk447799 | A | May 6, 2026, 2:26 p.m. | OK | JavaScript | TESTS | 4 | 218 | 31027200 | ||
| 373704569 | suarez2k16 | A | May 6, 2026, 10:44 a.m. | OK | Node.js | TESTS | 4 | 203 | 29593600 | ||
| 373686135 | Coder_Area | A | May 6, 2026, 8:07 a.m. | OK | PHP | TESTS | 4 | 78 | 29491200 | ||
| 373726411 | mayouxi | A | May 6, 2026, 1:54 p.m. | OK | PyPy 3 | TESTS | 4 | 328 | 17715200 | ||
| 373778506 | Nont1000 | A | May 7, 2026, 4:16 a.m. | OK | PyPy 3 | TESTS | 4 | 343 | 17100800 | ||
| 373678089 | wakabo | A | May 6, 2026, 7:28 a.m. | OK | PyPy 3 | TESTS | 4 | 359 | 17715200 | ||
| 373683605 | xbiniyam | A | May 6, 2026, 7:55 a.m. | OK | PyPy 3 | TESTS | 4 | 406 | 17715200 | ||
| 373730284 | iWontTellMyName | A | May 6, 2026, 2:27 p.m. | OK | PyPy 3 | TESTS | 4 | 437 | 17715200 | ||
| 373734463 | xbiniyam | A | May 6, 2026, 3:02 p.m. | OK | PyPy 3 | TESTS | 4 | 453 | 17203200 | ||
| 373679547 | kirnau17 | A | May 6, 2026, 7:35 a.m. | OK | PyPy 3 | TESTS | 4 | 484 | 17612800 | ||
| 373697512 | hxu10 | A | May 6, 2026, 9:26 a.m. | OK | PyPy 3-64 | TESTS | 4 | 78 | 31232000 | ||
| 373734051 | shubh_234 | A | May 6, 2026, 2:59 p.m. | OK | PyPy 3-64 | TESTS | 4 | 93 | 26419200 | ||
| 373744964 | titia | A | May 6, 2026, 4:38 p.m. | OK | PyPy 3-64 | TESTS | 4 | 93 | 26521600 | ||
| 373710352 | czsmall | A | May 6, 2026, 11:43 a.m. | OK | PyPy 3-64 | TESTS | 4 | 93 | 26521600 | ||
| 373784220 | sunny_204 | A | May 7, 2026, 6:05 a.m. | OK | PyPy 3-64 | TESTS | 4 | 93 | 26726400 | ||
| 373776086 | codejeff | A | May 7, 2026, 3:24 a.m. | OK | PyPy 3-64 | TESTS | 4 | 93 | 29286400 | ||
| 373777673 | LaLiLuLaiLo | A | May 7, 2026, 3:59 a.m. | OK | PyPy 3-64 | TESTS | 4 | 109 | 21606400 | ||
| 373777504 | aslammgaied | A | May 7, 2026, 3:56 a.m. | OK | PyPy 3-64 | TESTS | 4 | 109 | 26521600 | ||
| 373756377 | opankit | A | May 6, 2026, 6:41 p.m. | OK | PyPy 3-64 | TESTS | 4 | 109 | 26521600 | ||
| 373696001 | wasbee | A | May 6, 2026, 9:13 a.m. | OK | PyPy 3-64 | TESTS | 4 | 109 | 26521600 | ||
| 373727466 | eugalt | A | May 6, 2026, 2:02 p.m. | OK | Python 3 | TESTS | 4 | 93 | 19660800 | ||
| 373747812 | GnG_Tech | A | May 6, 2026, 5:08 p.m. | OK | Python 3 | TESTS | 4 | 93 | 25292800 | ||
| 373695616 | Rhnvrma | A | May 6, 2026, 9:09 a.m. | OK | Python 3 | TESTS | 4 | 93 | 26521600 | ||
| 373697978 | eugalt | A | May 6, 2026, 9:30 a.m. | OK | Python 3 | TESTS | 4 | 109 | 19558400 | ||
| 373710994 | bai1013 | A | May 6, 2026, 11:48 a.m. | OK | Python 3 | TESTS | 4 | 109 | 26521600 | ||
| 373719539 | KJJjjjdah | A | May 6, 2026, 12:59 p.m. | OK | Python 3 | TESTS | 4 | 125 | 22118400 | ||
| 373744005 | bbasy | A | May 6, 2026, 4:28 p.m. | OK | Python 3 | TESTS | 4 | 125 | 23859200 | ||
| 373726051 | Bhavishya_Jhamb | A | May 6, 2026, 1:51 p.m. | OK | Python 3 | TESTS | 4 | 125 | 23859200 | ||
| 373693310 | huynhkienkhai234 | A | May 6, 2026, 8:49 a.m. | OK | Python 3 | TESTS | 4 | 125 | 23859200 | ||
| 373677396 | Prabudh_ | A | May 6, 2026, 7:25 a.m. | OK | Python 3 | TESTS | 4 | 125 | 25190400 | ||
| 373686913 | Code_Client | A | May 6, 2026, 8:11 a.m. | OK | Ruby 3 | TESTS | 4 | 359 | 29593600 | ||
| 373748529 | cvs-650 | A | May 6, 2026, 5:16 p.m. | OK | Rust 2024 | TESTS | 4 | 31 | 4915200 | ||
| 373762930 | _JG_ | A | May 6, 2026, 8:49 p.m. | OK | Rust 2024 | TESTS | 4 | 62 | 0 |
Back to search problems