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 |
---|---|---|---|---|---|---|
1333 | Codeforces Round 632 (Div. 2) | FINISHED | False | 7200 | 145466699 | April 8, 2020, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 12640 ) | C | Eugene and an array | PROGRAMMING | binary search data structures hashing implementation two pointers |
B"Eugene likes working with arrays. And today he needs your help in solving one challenging task. An array c is a subarray of an array b if c can be obtained from b by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end. Let's call a nonempty array good if for every nonempty subarray of this array, sum of the elements of this subarray is nonzero. For example, array [-1, 2, -3] is good, as all arrays [-1] , [-1, 2] , [-1, 2, -3] , [2] , [2, -3] , [-3] have nonzero sums of elements. However, array [-1, 2, -1, -3] isn't good, as his subarray [-1, 2, -1] has sum of elements equal to 0 . Help Eugene to calculate the number of nonempty good subarrays of a given array a . The first line of the input contains a single integer n ( 1 <= n <= 2 x 10^5 ) -- the length of array a . The second line of the input contains n integers a_1, a_2, ... , a_n ( -10^9 <= a_i <= 10^9 ) -- the elements of a . Output a single integer -- the number of good subarrays of a . In the first sample, the following subarrays are good: [1] , [1, 2] , [2] , [2, -3] , [-3] . However, the subarray [1, 2, -3] isn't good, as its subarray [1, 2, -3] has sum of elements equal to 0 . In the second sample, three subarrays of size 1 are the only good subarrays. At the same time, the subarray [41, -41, 41] isn't good, as its subarray [41, -41] has sum of elements equal to 0 . "... |
Codeforces Round #632 (Div. 2) editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
76010808 | 0d1n | C | April 9, 2020, 3:58 p.m. | OK | Clang++17 Diagnostics | TESTS | 88 | 1450 | 20684800 | ||
76016430 | ruban | C | April 9, 2020, 4:47 p.m. | OK | Delphi | TESTS | 88 | 186 | 239616000 | ||
75940448 | Another_CraZYali | C | April 9, 2020, 1:02 a.m. | OK | GNU C++11 | TESTS | 87 | 78 | 4300800 | ||
75985833 | Enderturtle | C | April 9, 2020, 11:48 a.m. | OK | GNU C++11 | TESTS | 88 | 93 | 8089600 | ||
75985639 | Enderturtle | C | April 9, 2020, 11:46 a.m. | OK | GNU C++11 | TESTS | 88 | 93 | 8089600 | ||
76004659 | Fuyuki | C | April 9, 2020, 3 p.m. | OK | GNU C++11 | TESTS | 88 | 93 | 9011200 | ||
75941933 | LUL____SEPLED1305 | C | April 9, 2020, 1:42 a.m. | OK | GNU C++11 | TESTS | 87 | 93 | 10547200 | ||
75944246 | hx073269 | C | April 9, 2020, 2:38 a.m. | OK | GNU C++11 | TESTS | 87 | 108 | 4300800 | ||
76005085 | Fuyuki | C | April 9, 2020, 3:03 p.m. | OK | GNU C++11 | TESTS | 88 | 108 | 9011200 | ||
75901785 | sumlist | C | April 8, 2020, 4:14 p.m. | OK | GNU C++11 | TESTS | 87 | 108 | 21504000 | ||
75944045 | hx073269 | C | April 9, 2020, 2:34 a.m. | OK | GNU C++11 | TESTS | 87 | 109 | 3993600 | ||
75949515 | chen_03 | C | April 9, 2020, 4:30 a.m. | OK | GNU C++11 | TESTS | 88 | 109 | 4096000 | ||
75966417 | S_A.H_ | C | April 9, 2020, 8:05 a.m. | OK | GNU C++14 | TESTS | 88 | 93 | 4812800 | ||
76003993 | shdut0901 | C | April 9, 2020, 2:54 p.m. | OK | GNU C++14 | TESTS | 88 | 93 | 5734400 | ||
75966596 | S_A.H_ | C | April 9, 2020, 8:07 a.m. | OK | GNU C++14 | TESTS | 88 | 108 | 4812800 | ||
75938081 | sungjune222 | C | April 8, 2020, 11:55 p.m. | OK | GNU C++14 | TESTS | 87 | 108 | 6451200 | ||
75901219 | Rkda | C | April 8, 2020, 4:13 p.m. | OK | GNU C++14 | TESTS | 87 | 109 | 3993600 | ||
75966457 | S_A.H_ | C | April 9, 2020, 8:06 a.m. | OK | GNU C++14 | TESTS | 88 | 109 | 4812800 | ||
75926549 | Excogitatoris | C | April 8, 2020, 7:52 p.m. | OK | GNU C++14 | TESTS | 87 | 109 | 21811200 | ||
75924632 | Guendabiaani | C | April 8, 2020, 7:26 p.m. | OK | GNU C++14 | TESTS | 87 | 124 | 6451200 | ||
75903788 | TPC-Jimook | C | April 8, 2020, 4:19 p.m. | OK | GNU C++14 | TESTS | 87 | 124 | 7987200 | ||
75952359 | luogu_bot5 | C | April 9, 2020, 5:17 a.m. | OK | GNU C++14 | TESTS | 88 | 124 | 9318400 | ||
75950732 | jintiandun | C | April 9, 2020, 4:52 a.m. | OK | GNU C++17 | TESTS | 88 | 109 | 5632000 | ||
75932569 | kolina | C | April 8, 2020, 9:28 p.m. | OK | GNU C++17 | TESTS | 87 | 109 | 7270400 | ||
75903615 | VTruongAn | C | April 8, 2020, 4:19 p.m. | OK | GNU C++17 | TESTS | 87 | 109 | 8089600 | ||
75902039 | KazamaHoang | C | April 8, 2020, 4:15 p.m. | OK | GNU C++17 | TESTS | 87 | 109 | 8089600 | ||
76033637 | 0d1n | C | April 9, 2020, 7:44 p.m. | OK | GNU C++17 | TESTS | 88 | 109 | 9830400 | ||
75904636 | Chess88 | C | April 8, 2020, 4:21 p.m. | OK | GNU C++17 | TESTS | 87 | 109 | 10547200 | ||
75987073 | inszva | C | April 9, 2020, 12:01 p.m. | OK | GNU C++17 | TESTS | 88 | 109 | 11980800 | ||
75956645 | Excogitatoris | C | April 9, 2020, 6:15 a.m. | OK | GNU C++17 | TESTS | 88 | 109 | 15769600 | ||
75907146 | nanhtu | C | April 8, 2020, 4:26 p.m. | OK | GNU C++17 | TESTS | 87 | 109 | 32256000 | ||
76087517 | PinoF | C | April 10, 2020, 12:14 p.m. | OK | GNU C++17 | TESTS | 88 | 124 | 5632000 | ||
75943482 | ecnerwala | C | April 9, 2020, 2:22 a.m. | OK | GNU C++17 (64) | TESTS | 87 | 93 | 19353600 | ||
75943384 | ecnerwala | C | April 9, 2020, 2:20 a.m. | OK | GNU C++17 (64) | TESTS | 87 | 93 | 19353600 | ||
75943234 | ecnerwala | C | April 9, 2020, 2:16 a.m. | OK | GNU C++17 (64) | TESTS | 87 | 93 | 19353600 | ||
75995432 | hugopm | C | April 9, 2020, 1:31 p.m. | OK | GNU C++17 (64) | TESTS | 88 | 93 | 20992000 | ||
75923702 | Rahul | C | April 8, 2020, 7:16 p.m. | OK | GNU C++17 (64) | TESTS | 87 | 93 | 20992000 | ||
75923630 | Rahul | C | April 8, 2020, 7:15 p.m. | OK | GNU C++17 (64) | TESTS | 87 | 93 | 20992000 | ||
75920191 | Chilli | C | April 8, 2020, 6:40 p.m. | OK | GNU C++17 (64) | TESTS | 87 | 93 | 20992000 | ||
75952961 | stepbystep_noob | C | April 9, 2020, 5:26 a.m. | OK | GNU C++17 (64) | TESTS | 88 | 108 | 11878400 | ||
75944879 | a14789654 | C | April 9, 2020, 2:51 a.m. | OK | GNU C++17 (64) | TESTS | 87 | 109 | 8704000 | ||
75944863 | a14789654 | C | April 9, 2020, 2:51 a.m. | OK | GNU C++17 (64) | TESTS | 87 | 109 | 8704000 | ||
76333187 | Kontol | C | April 12, 2020, 1:59 p.m. | OK | Go | TESTS | 88 | 124 | 18022400 | ||
76081381 | pohzipohzi | C | April 10, 2020, 11:03 a.m. | OK | Go | TESTS | 88 | 124 | 23449600 | ||
76090765 | pohzipohzi | C | April 10, 2020, 12:51 p.m. | OK | Go | TESTS | 88 | 139 | 23552000 | ||
76082761 | pohzipohzi | C | April 10, 2020, 11:19 a.m. | OK | Go | TESTS | 88 | 155 | 23552000 | ||
76066414 | Perman | C | April 10, 2020, 7:43 a.m. | OK | Go | TESTS | 88 | 280 | 14438400 | ||
76036439 | bhautik_77 | C | April 9, 2020, 8:26 p.m. | OK | Java 11 | TESTS | 88 | 296 | 11059200 | ||
75917278 | Anonymous | C | April 8, 2020, 6:15 p.m. | OK | Java 11 | TESTS | 87 | 311 | 12083200 | ||
75964042 | Musin | C | April 9, 2020, 7:38 a.m. | OK | Java 11 | TESTS | 88 | 311 | 16076800 | ||
75973996 | ragnarok001 | C | April 9, 2020, 9:32 a.m. | OK | Java 11 | TESTS | 88 | 326 | 18227200 | ||
76041731 | alankritanand001 | C | April 9, 2020, 10:02 p.m. | OK | Java 11 | TESTS | 88 | 326 | 19456000 | ||
75983052 | saikaushik | C | April 9, 2020, 11:17 a.m. | OK | Java 11 | TESTS | 88 | 327 | 18227200 | ||
76033605 | bckslsh03 | C | April 9, 2020, 7:43 p.m. | OK | Java 11 | TESTS | 88 | 327 | 24576000 | ||
75906237 | anhpp | C | April 8, 2020, 4:24 p.m. | OK | Java 11 | TESTS | 87 | 327 | 57856000 | ||
76200313 | 201601120 | C | April 10, 2020, 6:02 p.m. | OK | Java 11 | TESTS | 88 | 343 | 22630400 | ||
76191091 | anshum_it_is | C | April 10, 2020, 4:52 p.m. | OK | Java 11 | TESTS | 88 | 343 | 25088000 | ||
75984168 | te_amo | C | April 9, 2020, 11:29 a.m. | OK | Java 8 | TESTS | 88 | 233 | 45465600 | ||
76025997 | In_The_Name_Of_Love | C | April 9, 2020, 6:13 p.m. | OK | Java 8 | TESTS | 88 | 234 | 16384000 | ||
76045872 | bluesky111 | C | April 10, 2020, 12:14 a.m. | OK | Java 8 | TESTS | 88 | 249 | 14848000 | ||
76052638 | A5SAS51N | C | April 10, 2020, 3:45 a.m. | OK | Java 8 | TESTS | 88 | 249 | 16384000 | ||
75905686 | ShesMyNerd | C | April 8, 2020, 4:23 p.m. | OK | Java 8 | TESTS | 87 | 249 | 16896000 | ||
75974534 | conquerorArpit | C | April 9, 2020, 9:38 a.m. | OK | Java 8 | TESTS | 88 | 249 | 17305600 | ||
75973994 | ragnarok001 | C | April 9, 2020, 9:32 a.m. | OK | Java 8 | TESTS | 88 | 249 | 17305600 | ||
75973783 | ragnarok001 | C | April 9, 2020, 9:30 a.m. | OK | Java 8 | TESTS | 88 | 249 | 17408000 | ||
75954600 | hetshah25 | C | April 9, 2020, 5:49 a.m. | OK | Java 8 | TESTS | 88 | 249 | 17715200 | ||
75929280 | yash49 | C | April 8, 2020, 8:30 p.m. | OK | Java 8 | TESTS | 87 | 249 | 17920000 | ||
75965841 | Spheniscine | C | April 9, 2020, 7:59 a.m. | OK | Kotlin | TESTS | 88 | 249 | 16384000 | ||
75965662 | Spheniscine | C | April 9, 2020, 7:57 a.m. | OK | Kotlin | TESTS | 88 | 265 | 18329600 | ||
75956412 | Spheniscine | C | April 9, 2020, 6:12 a.m. | OK | Kotlin | TESTS | 88 | 265 | 18329600 | ||
75960048 | sid9406 | C | April 9, 2020, 6:55 a.m. | OK | Kotlin | TESTS | 88 | 451 | 31846400 | ||
75959327 | sid9406 | C | April 9, 2020, 6:47 a.m. | OK | Kotlin | TESTS | 88 | 467 | 31846400 | ||
75904819 | koboshi | C | April 8, 2020, 4:21 p.m. | OK | Kotlin | TESTS | 87 | 514 | 55603200 | ||
76083028 | ansergeyg | C | April 10, 2020, 11:22 a.m. | OK | Mono C# | TESTS | 88 | 156 | 35328000 | ||
75901664 | riantkb | C | April 8, 2020, 4:14 p.m. | OK | Mono C# | TESTS | 87 | 156 | 42393600 | ||
75970721 | szzz- | C | April 9, 2020, 8:54 a.m. | OK | Mono C# | TESTS | 88 | 171 | 33996800 | ||
76082952 | ansergeyg | C | April 10, 2020, 11:21 a.m. | OK | Mono C# | TESTS | 88 | 171 | 35328000 | ||
75924707 | ValenKof | C | April 8, 2020, 7:27 p.m. | OK | Mono C# | TESTS | 87 | 171 | 39526400 | ||
75910064 | mban259 | C | April 8, 2020, 4:31 p.m. | OK | Mono C# | TESTS | 87 | 171 | 40243200 | ||
76194360 | jainchethan87 | C | April 10, 2020, 5:13 p.m. | OK | Mono C# | TESTS | 88 | 217 | 34918400 | ||
75925024 | ValenKof | C | April 8, 2020, 7:31 p.m. | OK | Mono C# | TESTS | 87 | 343 | 42188800 | ||
75937877 | VagrantAC | C | April 8, 2020, 11:48 p.m. | OK | MS C++ | TESTS | 87 | 202 | 9625600 | ||
76309976 | vjudge4 | C | April 12, 2020, 9:21 a.m. | OK | MS C++ | TESTS | 88 | 202 | 9728000 | ||
76237161 | vjudge2 | C | April 11, 2020, 6:13 a.m. | OK | MS C++ | TESTS | 88 | 217 | 12902400 | ||
76084069 | vjudge3 | C | April 10, 2020, 11:34 a.m. | OK | MS C++ | TESTS | 88 | 311 | 9728000 | ||
75925800 | theweird | C | April 8, 2020, 7:41 p.m. | OK | MS C++ | TESTS | 87 | 311 | 12902400 | ||
76240617 | vjudge1 | C | April 11, 2020, 7:02 a.m. | OK | MS C++ | TESTS | 88 | 358 | 9932800 | ||
75904621 | Bullbas | C | April 8, 2020, 4:21 p.m. | OK | MS C++ | TESTS | 87 | 358 | 11366400 | ||
75938298 | wjsrptmd | C | April 9, 2020, 12:03 a.m. | OK | MS C++ 2017 | TESTS | 87 | 187 | 8089600 | ||
75997284 | djl_SCUT | C | April 9, 2020, 1:50 p.m. | OK | MS C++ 2017 | TESTS | 88 | 187 | 10649600 | ||
75940636 | Monotonic | C | April 9, 2020, 1:08 a.m. | OK | MS C++ 2017 | TESTS | 87 | 202 | 8089600 | ||
75909898 | NCG4039. | C | April 8, 2020, 4:31 p.m. | OK | MS C++ 2017 | TESTS | 87 | 202 | 9728000 | ||
75948638 | SPOON796 | C | April 9, 2020, 4:11 a.m. | OK | MS C++ 2017 | TESTS | 87 | 202 | 9728000 | ||
75937721 | Libra_Glow | C | April 8, 2020, 11:44 p.m. | OK | MS C++ 2017 | TESTS | 87 | 217 | 10547200 | ||
75907402 | mavr | C | April 8, 2020, 4:27 p.m. | OK | MS C++ 2017 | TESTS | 87 | 218 | 8908800 | ||
76237816 | vjudge1 | C | April 11, 2020, 6:24 a.m. | OK | MS C++ 2017 | TESTS | 88 | 218 | 10444800 | ||
75903499 | lijiayi123 | C | April 8, 2020, 4:18 p.m. | OK | MS C++ 2017 | TESTS | 87 | 218 | 11264000 | ||
75916485 | an_na | C | April 8, 2020, 6:09 p.m. | OK | MS C++ 2017 | TESTS | 87 | 233 | 5939200 | ||
76000771 | lethehaiau | C | April 9, 2020, 2:23 p.m. | OK | Node.js | TESTS | 88 | 343 | 33280000 | ||
76229408 | nadeemshaikh | C | April 11, 2020, 3:55 a.m. | OK | PyPy 2 | TESTS | 88 | 265 | 30412800 | ||
76205256 | shehebe | C | April 10, 2020, 6:50 p.m. | OK | PyPy 2 | TESTS | 88 | 280 | 29081600 | ||
75903043 | bazzyadb | C | April 8, 2020, 4:17 p.m. | OK | PyPy 2 | TESTS | 87 | 295 | 29593600 | ||
76330735 | beethoven97 | C | April 12, 2020, 1:36 p.m. | OK | PyPy 2 | TESTS | 88 | 296 | 30208000 | ||
76229325 | nadeemshaikh | C | April 11, 2020, 3:53 a.m. | OK | PyPy 2 | TESTS | 88 | 326 | 30924800 | ||
75902945 | pa.n.ik | C | April 8, 2020, 4:17 p.m. | OK | PyPy 2 | TESTS | 87 | 327 | 33894400 | ||
75921716 | chaudhary_19 | C | April 8, 2020, 6:54 p.m. | OK | PyPy 2 | TESTS | 87 | 327 | 185548800 | ||
76022783 | 11fingers | C | April 9, 2020, 5:41 p.m. | OK | PyPy 2 | TESTS | 88 | 420 | 40652800 | ||
75903257 | starreg | C | April 8, 2020, 4:18 p.m. | OK | PyPy 2 | TESTS | 87 | 483 | 51916800 | ||
75912257 | kg01 | C | April 8, 2020, 4:34 p.m. | OK | PyPy 2 | TESTS | 87 | 483 | 52019200 | ||
75917262 | 510030805voidf | C | April 8, 2020, 6:15 p.m. | OK | PyPy 3 | TESTS | 87 | 327 | 34201600 | ||
75956689 | aliakbar09a | C | April 9, 2020, 6:16 a.m. | OK | PyPy 3 | TESTS | 88 | 420 | 29593600 | ||
76027180 | 28th | C | April 9, 2020, 6:25 p.m. | OK | PyPy 3 | TESTS | 88 | 420 | 35430400 | ||
76069099 | nocreative1 | C | April 10, 2020, 8:21 a.m. | OK | PyPy 3 | TESTS | 88 | 421 | 29696000 | ||
76001208 | adivannik | C | April 9, 2020, 2:27 p.m. | OK | PyPy 3 | TESTS | 88 | 421 | 29696000 | ||
76019706 | qwertz73355a | C | April 9, 2020, 5:15 p.m. | OK | PyPy 3 | TESTS | 88 | 421 | 30412800 | ||
76047558 | brthyyjp | C | April 10, 2020, 1:17 a.m. | OK | PyPy 3 | TESTS | 88 | 421 | 31641600 | ||
75951525 | Quicksnipe | C | April 9, 2020, 5:05 a.m. | OK | PyPy 3 | TESTS | 88 | 421 | 32153600 | ||
76066314 | codershuvo | C | April 10, 2020, 7:41 a.m. | OK | PyPy 3 | TESTS | 88 | 421 | 33177600 | ||
76066059 | codershuvo | C | April 10, 2020, 7:38 a.m. | OK | PyPy 3 | TESTS | 88 | 421 | 33177600 | ||
75909948 | sw_enthusiast | C | April 8, 2020, 4:31 p.m. | OK | Python 3 | TESTS | 87 | 249 | 23756800 | ||
76025750 | chgliu | C | April 9, 2020, 6:10 p.m. | OK | Python 3 | TESTS | 88 | 265 | 24166400 | ||
76240596 | Tiwari_Sorted | C | April 11, 2020, 7:02 a.m. | OK | Python 3 | TESTS | 88 | 280 | 23756800 | ||
76033067 | abod.hi.5 | C | April 9, 2020, 7:36 p.m. | OK | Python 3 | TESTS | 88 | 280 | 24064000 | ||
75999209 | guiferviz | C | April 9, 2020, 2:08 p.m. | OK | Python 3 | TESTS | 88 | 295 | 23756800 | ||
75951755 | huanghf | C | April 9, 2020, 5:08 a.m. | OK | Python 3 | TESTS | 88 | 296 | 23756800 | ||
75951939 | Quicksnipe | C | April 9, 2020, 5:11 a.m. | OK | Python 3 | TESTS | 88 | 296 | 24166400 | ||
75978595 | hlavko | C | April 9, 2020, 10:26 a.m. | OK | Python 3 | TESTS | 88 | 296 | 25190400 | ||
75957734 | Khan17 | C | April 9, 2020, 6:28 a.m. | OK | Python 3 | TESTS | 88 | 296 | 25292800 | ||
76009771 | kokubum | C | April 9, 2020, 3:49 p.m. | OK | Python 3 | TESTS | 88 | 311 | 24166400 | ||
76263632 | IvanDyachenko | C | April 11, 2020, 8:13 p.m. | OK | Scala | TESTS | 88 | 1465 | 32665600 |
Back to search problems