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 |
---|---|---|---|---|---|---|
1428 | Codeforces Raif Round 1 (Div. 1 + Div. 2) | FINISHED | False | 9000 | 134326463 | Oct. 17, 2020, 1:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2347 ) | F | Fruit Sequences | PROGRAMMING | binary search data structures divide and conquer dp |
B'Zookeeper is buying a carton of fruit to feed his pet wabbit. The fruits are a sequence of apples and oranges, which is represented by a binary string s_1s_2 ldots s_n of length n . 1 represents an apple and 0 represents an orange. Since wabbit is allergic to eating oranges, Zookeeper would like to find the longest contiguous sequence of apples. Let f(l,r) be the longest contiguous sequence of apples in the substring s_{l}s_{l+1} ldots s_{r} . Help Zookeeper find sum_{l=1}^{n} sum_{r=l}^{n} f(l,r) , or the sum of f across all substrings. The first line contains a single integer n (1 <= q n <= q 5 cdot 10^5) . The next line contains a binary string s of length n (s_i in {0,1 }) Print a single integer: sum_{l=1}^{n} sum_{r=l}^{n} f(l,r) . In the first test, there are ten substrings. The list of them (we let [l,r] be the substring s_l s_{l+1} ldots s_r ): The lengths of the longest contiguous sequence of ones in each of these ten substrings are 0,1,2,2,1,2,2,1,1,0 respectively. Hence, the answer is 0+1+2+2+1+2+2+1+1+0 = 12 . '... |
Codeforces Raif Round 1 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
95842875 | mikoo | F | Oct. 18, 2020, 5:47 a.m. | OK | GNU C++11 | TESTS | 51 | 31 | 2560000 | ||
95842859 | mikoo | F | Oct. 18, 2020, 5:47 a.m. | OK | GNU C++11 | TESTS | 51 | 31 | 2560000 | ||
95837780 | hellomath | F | Oct. 18, 2020, 3:45 a.m. | OK | GNU C++11 | TESTS | 51 | 31 | 2560000 | ||
95833901 | zhoukangyang | F | Oct. 18, 2020, 1:39 a.m. | OK | GNU C++11 | TESTS | 51 | 31 | 2662400 | ||
95833702 | zhoukangyang | F | Oct. 18, 2020, 1:30 a.m. | OK | GNU C++11 | TESTS | 51 | 31 | 2764800 | ||
95833878 | zhoukangyang | F | Oct. 18, 2020, 1:38 a.m. | OK | GNU C++11 | TESTS | 51 | 31 | 2764800 | ||
95833779 | zhoukangyang | F | Oct. 18, 2020, 1:34 a.m. | OK | GNU C++11 | TESTS | 51 | 31 | 2764800 | ||
95842036 | autistic_boy | F | Oct. 18, 2020, 5:30 a.m. | OK | GNU C++11 | TESTS | 51 | 31 | 3788800 | ||
95837635 | sunzihao | F | Oct. 18, 2020, 3:41 a.m. | OK | GNU C++11 | TESTS | 51 | 31 | 4505600 | ||
95817600 | srijon51 | F | Oct. 17, 2020, 5:51 p.m. | OK | GNU C++11 | TESTS | 51 | 31 | 4505600 | ||
95820600 | SlowDecay | F | Oct. 17, 2020, 6:37 p.m. | OK | GNU C++14 | TESTS | 51 | 46 | 1024000 | ||
95838992 | Indecchi | F | Oct. 18, 2020, 4:19 a.m. | OK | GNU C++14 | TESTS | 51 | 46 | 1024000 | ||
95835623 | cellokid63 | F | Oct. 18, 2020, 2:40 a.m. | OK | GNU C++14 | TESTS | 51 | 46 | 1024000 | ||
95836068 | 4790iop | F | Oct. 18, 2020, 2:55 a.m. | OK | GNU C++14 | TESTS | 51 | 46 | 2560000 | ||
95817292 | _no0B | F | Oct. 17, 2020, 5:46 p.m. | OK | GNU C++14 | TESTS | 51 | 46 | 3072000 | ||
95828021 | SuperJ6 | F | Oct. 17, 2020, 9:13 p.m. | OK | GNU C++14 | TESTS | 51 | 46 | 3993600 | ||
95828141 | xb0nS | F | Oct. 17, 2020, 9:17 p.m. | OK | GNU C++14 | TESTS | 51 | 46 | 4505600 | ||
95805388 | yogeshk972 | F | Oct. 17, 2020, 3:29 p.m. | OK | GNU C++14 | TESTS | 51 | 46 | 4505600 | ||
95816371 | Cinnamoroll | F | Oct. 17, 2020, 5:32 p.m. | OK | GNU C++14 | TESTS | 51 | 46 | 5017600 | ||
95802913 | Potassium | F | Oct. 17, 2020, 3:22 p.m. | OK | GNU C++14 | TESTS | 51 | 46 | 5120000 | ||
95800311 | sempav | F | Oct. 17, 2020, 3:14 p.m. | OK | GNU C++17 | TESTS | 51 | 31 | 3072000 | ||
95827285 | Ronnie007 | F | Oct. 17, 2020, 8:53 p.m. | OK | GNU C++17 | TESTS | 51 | 31 | 3072000 | ||
95806146 | RGB_ICPC2 | F | Oct. 17, 2020, 3:31 p.m. | OK | GNU C++17 | TESTS | 51 | 31 | 3072000 | ||
95835900 | gzhffIThh | F | Oct. 18, 2020, 2:49 a.m. | OK | GNU C++17 | TESTS | 51 | 31 | 3993600 | ||
95821817 | PrideBlack | F | Oct. 17, 2020, 6:58 p.m. | OK | GNU C++17 | TESTS | 51 | 31 | 5017600 | ||
95833976 | jainbot27 | F | Oct. 18, 2020, 1:42 a.m. | OK | GNU C++17 | TESTS | 51 | 31 | 5017600 | ||
95832724 | tloinuy | F | Oct. 18, 2020, 12:43 a.m. | OK | GNU C++17 | TESTS | 51 | 31 | 5017600 | ||
95828118 | sas4eka | F | Oct. 17, 2020, 9:16 p.m. | OK | GNU C++17 | TESTS | 51 | 31 | 7680000 | ||
95836280 | dongdziz | F | Oct. 18, 2020, 3:01 a.m. | OK | GNU C++17 | TESTS | 51 | 31 | 8499200 | ||
95802978 | Wild_Hamster | F | Oct. 17, 2020, 3:22 p.m. | OK | GNU C++17 | TESTS | 51 | 31 | 41369600 | ||
95830844 | rappel | F | Oct. 17, 2020, 11:02 p.m. | OK | GNU C++17 (64) | TESTS | 51 | 31 | 2560000 | ||
95830680 | rappel | F | Oct. 17, 2020, 10:54 p.m. | OK | GNU C++17 (64) | TESTS | 51 | 31 | 2560000 | ||
95822023 | smax | F | Oct. 17, 2020, 7:02 p.m. | OK | GNU C++17 (64) | TESTS | 51 | 31 | 3072000 | ||
95840903 | CoderAnshu | F | Oct. 18, 2020, 5:07 a.m. | OK | GNU C++17 (64) | TESTS | 51 | 31 | 3072000 | ||
95832501 | neal | F | Oct. 18, 2020, 12:30 a.m. | OK | GNU C++17 (64) | TESTS | 51 | 31 | 3072000 | ||
95832480 | neal | F | Oct. 18, 2020, 12:29 a.m. | OK | GNU C++17 (64) | TESTS | 51 | 31 | 3072000 | ||
95826044 | rds__98 | F | Oct. 17, 2020, 8:23 p.m. | OK | GNU C++17 (64) | TESTS | 51 | 31 | 3072000 | ||
95809842 | egneeS | F | Oct. 17, 2020, 4:22 p.m. | OK | GNU C++17 (64) | TESTS | 51 | 31 | 5017600 | ||
95828831 | MarcosK | F | Oct. 17, 2020, 9:40 p.m. | OK | GNU C++17 (64) | TESTS | 51 | 31 | 5120000 | ||
95829783 | rappel | F | Oct. 17, 2020, 10:15 p.m. | OK | GNU C++17 (64) | TESTS | 51 | 31 | 5120000 | ||
95837483 | b0bl0blaw | F | Oct. 18, 2020, 3:36 a.m. | OK | Java 11 | TESTS | 51 | 202 | 0 | ||
95801901 | iakovlev.zakhar | F | Oct. 17, 2020, 3:19 p.m. | OK | Java 11 | TESTS | 51 | 280 | 1638400 | ||
95811830 | Dukkha | F | Oct. 17, 2020, 4:35 p.m. | OK | Java 11 | TESTS | 51 | 389 | 3788800 | ||
95839099 | Agnimandur | F | Oct. 18, 2020, 4:22 a.m. | OK | Java 11 | TESTS | 51 | 421 | 0 | ||
95822625 | lucasr | F | Oct. 17, 2020, 7:13 p.m. | OK | Java 11 | TESTS | 51 | 483 | 6246400 | ||
95822520 | lucasr | F | Oct. 17, 2020, 7:11 p.m. | OK | Java 11 | TESTS | 51 | 514 | 6348800 | ||
95822653 | lucasr | F | Oct. 17, 2020, 7:14 p.m. | OK | Java 11 | TESTS | 51 | 514 | 6348800 | ||
95822692 | lucasr | F | Oct. 17, 2020, 7:15 p.m. | OK | Java 11 | TESTS | 51 | 529 | 6348800 | ||
95822601 | lucasr | F | Oct. 17, 2020, 7:13 p.m. | OK | Java 11 | TESTS | 51 | 561 | 6348800 | ||
95822942 | lucasr | F | Oct. 17, 2020, 7:19 p.m. | OK | Java 11 | TESTS | 51 | 639 | 6348800 | ||
95829285 | TheSawan | F | Oct. 17, 2020, 9:55 p.m. | OK | Java 8 | TESTS | 51 | 124 | 0 | ||
95829062 | polyakoff | F | Oct. 17, 2020, 9:48 p.m. | OK | Java 8 | TESTS | 51 | 249 | 2764800 | ||
95803651 | fetetriste | F | Oct. 17, 2020, 3:24 p.m. | OK | Java 8 | TESTS | 51 | 264 | 12697600 | ||
95806552 | Taran_1407 | F | Oct. 17, 2020, 3:32 p.m. | OK | Java 8 | TESTS | 51 | 420 | 32972800 | ||
95835466 | derrick20 | F | Oct. 18, 2020, 2:35 a.m. | OK | Java 8 | TESTS | 51 | 514 | 19046400 | ||
95828367 | martins | F | Oct. 17, 2020, 9:24 p.m. | OK | Java 8 | TESTS | 51 | 624 | 93900800 | ||
95815795 | BNL | F | Oct. 17, 2020, 5:24 p.m. | OK | Java 8 | TESTS | 51 | 1231 | 258764800 | ||
95798916 | cwise | F | Oct. 17, 2020, 3:10 p.m. | OK | Java 8 | TESTS | 51 | 1232 | 110080000 | ||
95831589 | Spheniscine | F | Oct. 17, 2020, 11:38 p.m. | OK | Kotlin | TESTS | 51 | 140 | 2764800 | ||
95810700 | Musin | F | Oct. 17, 2020, 4:26 p.m. | OK | Kotlin | TESTS | 51 | 202 | 10137600 | ||
95812448 | Tlatoani | F | Oct. 17, 2020, 4:41 p.m. | OK | Kotlin | TESTS | 51 | 249 | 0 | ||
95805038 | Spheniscine | F | Oct. 17, 2020, 3:28 p.m. | OK | Kotlin | TESTS | 51 | 249 | 0 | ||
95822976 | dominotim | F | Oct. 17, 2020, 7:19 p.m. | OK | MS C++ 2017 | TESTS | 51 | 62 | 8908800 | ||
95813267 | Numbervan | F | Oct. 17, 2020, 4:50 p.m. | OK | MS C++ 2017 | TESTS | 51 | 857 | 36659200 | ||
95801385 | azukun | F | Oct. 17, 2020, 3:18 p.m. | OK | .NET Core C# | TESTS | 51 | 109 | 11264000 | ||
95832358 | ngoc.ks | F | Oct. 18, 2020, 12:23 a.m. | OK | Node.js | TESTS | 51 | 202 | 7270400 | ||
95822642 | gintoki_s | F | Oct. 17, 2020, 7:14 p.m. | OK | PyPy 3 | TESTS | 51 | 202 | 6553600 | ||
95817578 | marcus.test | F | Oct. 17, 2020, 5:50 p.m. | OK | PyPy 3 | TESTS | 51 | 218 | 7270400 | ||
95813497 | Persoinfy20 | F | Oct. 17, 2020, 4:53 p.m. | OK | PyPy 3 | TESTS | 51 | 295 | 9011200 | ||
95798796 | yuusanlondon | F | Oct. 17, 2020, 3:10 p.m. | OK | PyPy 3 | TESTS | 51 | 327 | 37068800 | ||
95810566 | kclee2172 | F | Oct. 17, 2020, 4:25 p.m. | OK | PyPy 3 | TESTS | 51 | 389 | 17305600 | ||
95805274 | pineriver | F | Oct. 17, 2020, 3:29 p.m. | OK | PyPy 3 | TESTS | 51 | 842 | 26828800 | ||
95804249 | SPD_9X2 | F | Oct. 17, 2020, 3:26 p.m. | OK | PyPy 3 | TESTS | 51 | 1091 | 31744000 | ||
95843057 | nwi | F | Oct. 18, 2020, 5:50 a.m. | OK | Python 2 | TESTS | 51 | 998 | 64204800 | ||
95824034 | prayashverma007 | F | Oct. 17, 2020, 7:40 p.m. | OK | Python 3 | TESTS | 51 | 468 | 17817600 | ||
95826077 | prayashverma007 | F | Oct. 17, 2020, 8:24 p.m. | OK | Python 3 | TESTS | 51 | 483 | 17817600 | ||
95831396 | Lotus007 | F | Oct. 17, 2020, 11:28 p.m. | OK | Python 3 | TESTS | 51 | 639 | 15872000 | ||
95810767 | sh1194 | F | Oct. 17, 2020, 4:27 p.m. | OK | Python 3 | TESTS | 51 | 842 | 2048000 | ||
95802724 | tuna_salad | F | Oct. 17, 2020, 3:22 p.m. | OK | Rust | TESTS | 51 | 46 | 6144000 | ||
95817951 | sansen | F | Oct. 17, 2020, 5:56 p.m. | OK | Rust | TESTS | 51 | 46 | 14131200 |
Back to search problems