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 |
---|---|---|---|---|---|---|
1748 | Codeforces Round 833 (Div. 2) | FINISHED | False | 7200 | 63559499 | Nov. 12, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 11236 ) | C | Zero-Sum Prefixes | PROGRAMMING | brute force data structures dp greedy implementation | 1600 |
B'The score of an array v_1,v_2, ldots,v_n is defined as the number of indices i ( 1 <= i <= n ) such that v_1+v_2+ ldots+v_i = 0 . You are given an array a_1,a_2, ldots,a_n of length n . You can perform the following operation multiple times: What is the maximum possible score of a that can be obtained by performing a sequence of such operations? Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the length of the array a . The second line of each test case contains n integers a_1,a_2, ldots,a_n ( -10^9 <= a_i <= 10^9 ) -- array a . It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, print the maximum possible score of the array a after performing a sequence of operations. In the first test case, it is optimal to change the value of a_2 to -2 in one operation. The resulting array a will be [2,-2,1,-1,0] , with a score of 3 : In the second test case, it is optimal to change the value of a_3 to -2 ,000 ,000 ,000 , giving us an array with a score of 1 . In the third test case, it is not necessary to perform any operations. '... |
Codeforces Round #833 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
180687519 | broiampro | C | Nov. 12, 2022, 8:41 p.m. | OK | C# 8 | TESTS | 18 | 186 | 45260800 | 1600 | |
180649020 | ssvb | C | Nov. 12, 2022, 4:08 p.m. | OK | D | TESTS | 18 | 93 | 37990400 | 1600 | |
180644490 | cyrus_msk | C | Nov. 12, 2022, 3:53 p.m. | OK | D | TESTS | 18 | 93 | 37990400 | 1600 | |
180649033 | ruban | C | Nov. 12, 2022, 4:08 p.m. | OK | Delphi | TESTS | 18 | 187 | 142131200 | 1600 | |
180664550 | Mushfiqur_ | C | Nov. 12, 2022, 5:43 p.m. | OK | GNU C11 | TESTS | 18 | 78 | 3993600 | 1600 | |
180653965 | LOOP0 | C | Nov. 12, 2022, 4:27 p.m. | OK | GNU C11 | TESTS | 18 | 93 | 3993600 | 1600 | |
180701521 | Etamsylate | C | Nov. 13, 2022, 3:05 a.m. | OK | GNU C++14 | TESTS | 18 | 61 | 21094400 | 1600 | |
180651938 | MihaiMocanu2 | C | Nov. 12, 2022, 4:19 p.m. | OK | GNU C++14 | TESTS | 18 | 62 | 1536000 | 1600 | |
180645420 | Gxstarry. | C | Nov. 12, 2022, 3:56 p.m. | OK | GNU C++14 | TESTS | 18 | 62 | 7987200 | 1600 | |
180701062 | Etamsylate | C | Nov. 13, 2022, 2:55 a.m. | OK | GNU C++14 | TESTS | 18 | 62 | 19763200 | 1600 | |
180698559 | alkido | C | Nov. 13, 2022, 1:52 a.m. | OK | GNU C++14 | TESTS | 18 | 77 | 2355200 | 1600 | |
180644548 | Nyanya_ | C | Nov. 12, 2022, 3:53 p.m. | OK | GNU C++14 | TESTS | 18 | 77 | 3993600 | 1600 | |
180670683 | skmprohunt | C | Nov. 12, 2022, 6:51 p.m. | OK | GNU C++14 | TESTS | 18 | 78 | 4812800 | 1600 | |
180696896 | gjx | C | Nov. 13, 2022, 1:03 a.m. | OK | GNU C++14 | TESTS | 18 | 78 | 4812800 | 1600 | |
180658108 | HarryFan | C | Nov. 12, 2022, 4:51 p.m. | OK | GNU C++14 | TESTS | 18 | 78 | 10547200 | 1600 | |
180702531 | FloorX | C | Nov. 13, 2022, 3:30 a.m. | OK | GNU C++14 | TESTS | 18 | 78 | 10649600 | 1600 | |
180709263 | Bobocan | C | Nov. 13, 2022, 5:38 a.m. | OK | GNU C++17 | TESTS | 19 | 31 | 7782400 | 1600 | |
180645922 | changez | C | Nov. 12, 2022, 3:57 p.m. | OK | GNU C++17 | TESTS | 18 | 62 | 2560000 | 1600 | |
180702663 | kundongjin | C | Nov. 13, 2022, 3:34 a.m. | OK | GNU C++17 | TESTS | 18 | 62 | 3174400 | 1600 | |
180655908 | torrrin | C | Nov. 12, 2022, 4:33 p.m. | OK | GNU C++17 | TESTS | 18 | 78 | 3174400 | 1600 | |
180659166 | anurag_5 | C | Nov. 12, 2022, 4:58 p.m. | OK | GNU C++17 | TESTS | 18 | 78 | 3993600 | 1600 | |
180651065 | George_Rubio | C | Nov. 12, 2022, 4:16 p.m. | OK | GNU C++17 | TESTS | 18 | 78 | 6348800 | 1600 | |
180650725 | lixflora | C | Nov. 12, 2022, 4:15 p.m. | OK | GNU C++17 | TESTS | 18 | 78 | 8294400 | 1600 | |
180692398 | ikaurov | C | Nov. 12, 2022, 10:25 p.m. | OK | GNU C++17 | TESTS | 18 | 78 | 8294400 | 1600 | |
180649522 | rdx_ | C | Nov. 12, 2022, 4:10 p.m. | OK | GNU C++17 | TESTS | 18 | 78 | 9011200 | 1600 | |
180695356 | SAT2020 | C | Nov. 13, 2022, 12:08 a.m. | OK | GNU C++17 | TESTS | 18 | 78 | 9420800 | 1600 | |
180686652 | biggy_cheese | C | Nov. 12, 2022, 8:27 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 62 | 21708800 | 1600 | |
180645707 | Beevo | C | Nov. 12, 2022, 3:57 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 77 | 13721600 | 1600 | |
180647040 | gqf123 | C | Nov. 12, 2022, 4:01 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 77 | 14540800 | 1600 | |
180649819 | os-moussao | C | Nov. 12, 2022, 4:11 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 77 | 14540800 | 1600 | |
180688840 | enslaved | C | Nov. 12, 2022, 9:02 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 77 | 15360000 | 1600 | |
180689675 | I_am_Sherlocked | C | Nov. 12, 2022, 9:19 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 77 | 16076800 | 1600 | |
180686618 | biggy_cheese | C | Nov. 12, 2022, 8:26 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 77 | 21708800 | 1600 | |
180681931 | biggy_cheese | C | Nov. 12, 2022, 8:04 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 77 | 21708800 | 1600 | |
180700862 | pursuit_of_happiness | C | Nov. 13, 2022, 2:50 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 77 | 22528000 | 1600 | |
180702346 | pursuit_of_happiness | C | Nov. 13, 2022, 3:26 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 77 | 22528000 | 1600 | |
180692201 | 36champ | C | Nov. 12, 2022, 10:19 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 46 | 5017600 | 1600 | |
180644363 | speedeam | C | Nov. 12, 2022, 3:52 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 46 | 5836800 | 1600 | |
180679966 | Shihab567 | C | Nov. 12, 2022, 7:37 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 46 | 10752000 | 1600 | |
180689068 | rI_In | C | Nov. 12, 2022, 9:06 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 46 | 11468800 | 1600 | |
180645308 | 444 | C | Nov. 12, 2022, 3:55 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 46 | 11571200 | 1600 | |
180698315 | MicroMaker | C | Nov. 13, 2022, 1:45 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 46 | 13107200 | 1600 | |
180700716 | Etamsylate | C | Nov. 13, 2022, 2:47 a.m. | OK | GNU C++20 (64) | TESTS | 18 | 46 | 21401600 | 1600 | |
180677064 | mintplz | C | Nov. 12, 2022, 7 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 61 | 11571200 | 1600 | |
180689167 | Bodol7 | C | Nov. 12, 2022, 9:09 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 61 | 13107200 | 1600 | |
180664058 | Eltoney | C | Nov. 12, 2022, 5:38 p.m. | OK | GNU C++20 (64) | TESTS | 18 | 61 | 13107200 | 1600 | |
180648027 | shojin_pro | C | Nov. 12, 2022, 4:05 p.m. | OK | Java 11 | TESTS | 18 | 265 | 12390400 | 1600 | |
180677606 | IanISam | C | Nov. 12, 2022, 7:07 p.m. | OK | Java 11 | TESTS | 18 | 296 | 12288000 | 1600 | |
180651419 | mareshkau | C | Nov. 12, 2022, 4:17 p.m. | OK | Java 11 | TESTS | 18 | 311 | 14540800 | 1600 | |
180663218 | peiyeliu | C | Nov. 12, 2022, 5:30 p.m. | OK | Java 11 | TESTS | 18 | 312 | 11161600 | 1600 | |
180690704 | GoldenShadow | C | Nov. 12, 2022, 9:43 p.m. | OK | Java 11 | TESTS | 18 | 327 | 12390400 | 1600 | |
180655279 | samitdas03 | C | Nov. 12, 2022, 4:31 p.m. | OK | Java 11 | TESTS | 18 | 327 | 14336000 | 1600 | |
180663673 | dzhi | C | Nov. 12, 2022, 5:34 p.m. | OK | Java 11 | TESTS | 18 | 467 | 30924800 | 1600 | |
180709067 | sf14t | C | Nov. 13, 2022, 5:36 a.m. | OK | Java 11 | TESTS | 19 | 530 | 167628800 | 1600 | |
180698204 | the_unseen | C | Nov. 13, 2022, 1:42 a.m. | OK | Java 11 | TESTS | 18 | 560 | 45568000 | 1600 | |
180664471 | Sachin872003 | C | Nov. 12, 2022, 5:42 p.m. | OK | Java 11 | TESTS | 18 | 576 | 14540800 | 1600 | |
180694470 | _Abeke_ | C | Nov. 12, 2022, 11:32 p.m. | OK | Java 17 | TESTS | 18 | 295 | 24473600 | 1600 | |
180678238 | casenova01 | C | Nov. 12, 2022, 7:15 p.m. | OK | Java 17 | TESTS | 18 | 296 | 15872000 | 1600 | |
180648413 | Mamimi | C | Nov. 12, 2022, 4:06 p.m. | OK | Java 17 | TESTS | 18 | 312 | 15257600 | 1600 | |
180697711 | kkz666 | C | Nov. 13, 2022, 1:27 a.m. | OK | Java 17 | TESTS | 18 | 327 | 19456000 | 1600 | |
180649110 | Eslam_Ahmed | C | Nov. 12, 2022, 4:08 p.m. | OK | Java 17 | TESTS | 18 | 373 | 18944000 | 1600 | |
180645490 | vivek1401 | C | Nov. 12, 2022, 3:56 p.m. | OK | Java 17 | TESTS | 18 | 389 | 12185600 | 1600 | |
180655232 | AhmedZ | C | Nov. 12, 2022, 4:31 p.m. | OK | Java 17 | TESTS | 18 | 405 | 19353600 | 1600 | |
180646501 | SHEPELEVALEXEY | C | Nov. 12, 2022, 3:59 p.m. | OK | Java 17 | TESTS | 18 | 467 | 29593600 | 1600 | |
180661499 | vaibhav_1710 | C | Nov. 12, 2022, 5:15 p.m. | OK | Java 8 | TESTS | 18 | 202 | 14028800 | 1600 | |
180699975 | tbs-jyy | C | Nov. 13, 2022, 2:28 a.m. | OK | Java 8 | TESTS | 18 | 202 | 17920000 | 1600 | |
180668250 | ak_ankit_ | C | Nov. 12, 2022, 6:21 p.m. | OK | Java 8 | TESTS | 18 | 217 | 12902400 | 1600 | |
180659814 | youtsuha | C | Nov. 12, 2022, 5:02 p.m. | OK | Java 8 | TESTS | 18 | 217 | 15667200 | 1600 | |
180659661 | youtsuha2.0 | C | Nov. 12, 2022, 5:01 p.m. | OK | Java 8 | TESTS | 18 | 217 | 15667200 | 1600 | |
180646747 | Virendra115 | C | Nov. 12, 2022, 4 p.m. | OK | Java 8 | TESTS | 18 | 218 | 12800000 | 1600 | |
180666523 | _NursultaN_ | C | Nov. 12, 2022, 6:03 p.m. | OK | Java 8 | TESTS | 18 | 218 | 17715200 | 1600 | |
180678357 | tyrion_123 | C | Nov. 12, 2022, 7:16 p.m. | OK | Java 8 | TESTS | 18 | 233 | 12800000 | 1600 | |
180670000 | gagan_6730 | C | Nov. 12, 2022, 6:42 p.m. | OK | Java 8 | TESTS | 18 | 233 | 13107200 | 1600 | |
180661008 | leonlian | C | Nov. 12, 2022, 5:11 p.m. | OK | Java 8 | TESTS | 18 | 233 | 16486400 | 1600 | |
180655082 | Bobko | C | Nov. 12, 2022, 4:31 p.m. | OK | Kotlin 1.7 | TESTS | 18 | 951 | 151142400 | 1600 | |
180662495 | the_killah | C | Nov. 12, 2022, 5:24 p.m. | OK | MS C++ 2017 | TESTS | 18 | 93 | 4915200 | 1600 | |
180648500 | gaspar.kristijan | C | Nov. 12, 2022, 4:06 p.m. | OK | MS C++ 2017 | TESTS | 18 | 218 | 11468800 | 1600 | |
180686593 | Vitru | C | Nov. 12, 2022, 8:26 p.m. | OK | MS C++ 2017 | TESTS | 18 | 249 | 9728000 | 1600 | |
180670005 | zjuwyz | C | Nov. 12, 2022, 6:42 p.m. | OK | MS C++ 2017 | TESTS | 18 | 249 | 11776000 | 1600 | |
180651032 | DmitryVol | C | Nov. 12, 2022, 4:16 p.m. | OK | MS C++ 2017 | TESTS | 18 | 296 | 13107200 | 1600 | |
180697579 | LiuZhaocheng | C | Nov. 13, 2022, 1:24 a.m. | OK | MS C++ 2017 | TESTS | 18 | 327 | 17715200 | 1600 | |
180677030 | organput | C | Nov. 12, 2022, 7 p.m. | OK | MS C++ 2017 | TESTS | 18 | 420 | 10547200 | 1600 | |
180667708 | Greyhound | C | Nov. 12, 2022, 6:15 p.m. | OK | PyPy 3 | TESTS | 18 | 405 | 41779200 | 1600 | |
180646902 | andriy.borzenkov | C | Nov. 12, 2022, 4:01 p.m. | OK | PyPy 3 | TESTS | 18 | 639 | 23040000 | 1600 | |
180710061 | ishaanshri95 | C | Nov. 13, 2022, 5:50 a.m. | OK | PyPy 3 | TESTS | 20 | 670 | 33177600 | 1600 | |
180653423 | alxwen711 | C | Nov. 12, 2022, 4:25 p.m. | OK | PyPy 3 | TESTS | 18 | 716 | 50585600 | 1600 | |
180688391 | dalgu | C | Nov. 12, 2022, 8:55 p.m. | OK | PyPy 3-64 | TESTS | 18 | 171 | 34099200 | 1600 | |
180663465 | gesuta | C | Nov. 12, 2022, 5:33 p.m. | OK | PyPy 3-64 | TESTS | 18 | 187 | 30822400 | 1600 | |
180689990 | MasterVroom | C | Nov. 12, 2022, 9:27 p.m. | OK | PyPy 3-64 | TESTS | 18 | 187 | 33280000 | 1600 | |
180690990 | biglunchdude | C | Nov. 12, 2022, 9:49 p.m. | OK | PyPy 3-64 | TESTS | 18 | 187 | 34201600 | 1600 | |
180693501 | biglunchdude | C | Nov. 12, 2022, 11:01 p.m. | OK | PyPy 3-64 | TESTS | 18 | 187 | 38809600 | 1600 | |
180665054 | gesuta | C | Nov. 12, 2022, 5:48 p.m. | OK | PyPy 3-64 | TESTS | 18 | 202 | 30822400 | 1600 | |
180645987 | yash_0402 | C | Nov. 12, 2022, 3:58 p.m. | OK | PyPy 3-64 | TESTS | 18 | 202 | 32768000 | 1600 | |
180661182 | Juanm1 | C | Nov. 12, 2022, 5:13 p.m. | OK | PyPy 3-64 | TESTS | 18 | 202 | 35123200 | 1600 | |
180688004 | hkwu6013 | C | Nov. 12, 2022, 8:49 p.m. | OK | PyPy 3-64 | TESTS | 18 | 202 | 36147200 | 1600 | |
180666795 | gesuta | C | Nov. 12, 2022, 6:05 p.m. | OK | PyPy 3-64 | TESTS | 18 | 202 | 37171200 | 1600 | |
180648152 | TristanC | C | Nov. 12, 2022, 4:05 p.m. | OK | Python 3 | TESTS | 18 | 280 | 21504000 | 1600 | |
180683218 | vlk0 | C | Nov. 12, 2022, 8:23 p.m. | OK | Python 3 | TESTS | 18 | 327 | 18022400 | 1600 | |
180650605 | Namanrockzzz | C | Nov. 12, 2022, 4:14 p.m. | OK | Python 3 | TESTS | 18 | 467 | 17817600 | 1600 | |
180662876 | liut | C | Nov. 12, 2022, 5:28 p.m. | OK | Rust 2021 | TESTS | 18 | 46 | 9318400 | 1600 | |
180659455 | p-a-t | C | Nov. 12, 2022, 4:59 p.m. | OK | Rust 2021 | TESTS | 18 | 61 | 7680000 | 1600 | |
180653402 | happy_zig_user | C | Nov. 12, 2022, 4:25 p.m. | OK | Rust 2021 | TESTS | 18 | 61 | 13926400 | 1600 |
Back to search problems