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 |
---|---|---|---|---|---|---|
1168 | Codeforces Round 562 (Div. 1) | FINISHED | False | 7200 | 172938299 | May 26, 2019, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3577 ) | B | Good Triple | PROGRAMMING | brute force two pointers | 2000 |
B'Toad Rash has a binary string s . A binary string consists only of zeros and ones. Let n be the length of s . Rash needs to find the number of such pairs of integers l , r that 1 <= q l <= q r <= q n and there is at least one pair of integers x , k such that 1 <= q x, k <= q n , l <= q x < x + 2k <= q r , and s_x = s_{x+k} = s_{x+2k} . Find this number of pairs for Rash. The first line contains the string s ( 1 <= q |s| <= q 300 ,000 ), consisting of zeros and ones. Output one integer: the number of such pairs of integers l , r that 1 <= q l <= q r <= q n and there is at least one pair of integers x , k such that 1 <= q x, k <= q n , l <= q x < x + 2k <= q r , and s_x = s_{x+k} = s_{x+2k} . In the first example, there are three l , r pairs we need to count: 1 , 6 ; 2 , 6 ; and 1 , 5 . In the second example, there are no values x , k for the initial string, so the answer is 0 . '... |
Codeforces Round #562 — Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
55079220 | deongaree | B | June 4, 2019, 10:01 a.m. | OK | Clang++17 Diagnostics | TESTS | 27 | 140 | 15564800 | 2000 | |
54677928 | yosupo | B | May 26, 2019, 4:04 p.m. | OK | D | TESTS | 27 | 46 | 4198400 | 2000 | |
54734762 | fluffyowl | B | May 28, 2019, 4:04 a.m. | OK | D | TESTS | 27 | 124 | 4198400 | 2000 | |
57831927 | xumingyang | B | July 27, 2019, 6:19 a.m. | OK | GNU C++11 | TESTS | 27 | 30 | 307200 | 2000 | |
56020797 | wbyyui | B | June 25, 2019, 3:08 a.m. | OK | GNU C++11 | TESTS | 27 | 30 | 1638400 | 2000 | |
54680827 | mghzs1997 | B | May 26, 2019, 4:17 p.m. | OK | GNU C++11 | TESTS | 27 | 30 | 2560000 | 2000 | |
56007406 | tyf0530 | B | June 24, 2019, 4:17 p.m. | OK | GNU C++11 | TESTS | 27 | 30 | 2969600 | 2000 | |
68744446 | Zishu_Jun | B | Jan. 14, 2020, 3:40 a.m. | OK | GNU C++11 | TESTS | 27 | 31 | 102400 | 2000 | |
60054856 | luogu_bot2 | B | Sept. 5, 2019, 3:23 a.m. | OK | GNU C++11 | TESTS | 27 | 31 | 102400 | 2000 | |
55423057 | luogu_bot5 | B | June 11, 2019, 7:34 a.m. | OK | GNU C++11 | TESTS | 27 | 31 | 102400 | 2000 | |
55350724 | Freedom | B | June 9, 2019, 3:09 p.m. | OK | GNU C++11 | TESTS | 27 | 31 | 102400 | 2000 | |
55062979 | zcrrzcr | B | June 4, 2019, 1:06 a.m. | OK | GNU C++11 | TESTS | 27 | 31 | 102400 | 2000 | |
54877473 | Karnage | B | May 31, 2019, 12:31 p.m. | OK | GNU C++11 | TESTS | 27 | 31 | 102400 | 2000 | |
54784695 | yasugongshang | B | May 29, 2019, 2:42 a.m. | OK | GNU C++14 | TESTS | 27 | 15 | 307200 | 2000 | |
54694315 | XLor | B | May 26, 2019, 6:24 p.m. | OK | GNU C++14 | TESTS | 27 | 15 | 307200 | 2000 | |
54752715 | Het262 | B | May 28, 2019, 1:36 p.m. | OK | GNU C++14 | TESTS | 27 | 15 | 1024000 | 2000 | |
60380168 | LLL564 | B | Sept. 11, 2019, 8:45 a.m. | OK | GNU C++14 | TESTS | 27 | 30 | 307200 | 2000 | |
56396712 | HanZhongBalls | B | July 1, 2019, 2:56 p.m. | OK | GNU C++14 | TESTS | 27 | 30 | 307200 | 2000 | |
54820099 | mayaohua2003 | B | May 30, 2019, 1:31 a.m. | OK | GNU C++14 | TESTS | 27 | 30 | 307200 | 2000 | |
54721237 | enot110 | B | May 27, 2019, 5:30 p.m. | OK | GNU C++14 | TESTS | 27 | 30 | 307200 | 2000 | |
54708756 | Newusers | B | May 27, 2019, 6:44 a.m. | OK | GNU C++14 | TESTS | 27 | 30 | 307200 | 2000 | |
54708405 | m4h | B | May 27, 2019, 6:28 a.m. | OK | GNU C++14 | TESTS | 27 | 30 | 307200 | 2000 | |
54699456 | sysulby | B | May 26, 2019, 9:31 p.m. | OK | GNU C++14 | TESTS | 27 | 30 | 307200 | 2000 | |
59811954 | stArliGht | B | Aug. 31, 2019, 1:55 p.m. | OK | GNU C++17 | TESTS | 27 | 15 | 307200 | 2000 | |
54740543 | eddy1021 | B | May 28, 2019, 7:39 a.m. | OK | GNU C++17 | TESTS | 27 | 15 | 307200 | 2000 | |
54696392 | _MGH_ | B | May 26, 2019, 7:19 p.m. | OK | GNU C++17 | TESTS | 27 | 15 | 1024000 | 2000 | |
54678569 | saketh | B | May 26, 2019, 4:07 p.m. | OK | GNU C++17 | TESTS | 27 | 15 | 1024000 | 2000 | |
54807135 | Mayimg | B | May 29, 2019, 2:47 p.m. | OK | GNU C++17 | TESTS | 27 | 15 | 2252800 | 2000 | |
54957824 | yehuan | B | June 2, 2019, 1:31 a.m. | OK | GNU C++17 | TESTS | 27 | 15 | 2969600 | 2000 | |
54767009 | MadMax | B | May 28, 2019, 5:37 p.m. | OK | GNU C++17 | TESTS | 27 | 15 | 5120000 | 2000 | |
64664826 | Chaigidel | B | Nov. 11, 2019, 12:56 a.m. | OK | GNU C++17 | TESTS | 27 | 30 | 307200 | 2000 | |
54839033 | BBpigeon | B | May 30, 2019, 12:01 p.m. | OK | GNU C++17 | TESTS | 27 | 30 | 307200 | 2000 | |
54828799 | vjudge3 | B | May 30, 2019, 7:54 a.m. | OK | GNU C++17 | TESTS | 27 | 30 | 307200 | 2000 | |
55115759 | tkachenko | B | June 5, 2019, 8:34 a.m. | OK | Go | TESTS | 27 | 31 | 716800 | 2000 | |
54866028 | wretar | B | May 31, 2019, 6:16 a.m. | OK | Java 8 | TESTS | 27 | 109 | 0 | 2000 | |
54830836 | ayush1212 | B | May 30, 2019, 8:51 a.m. | OK | Java 8 | TESTS | 27 | 109 | 0 | 2000 | |
54798148 | KharYusuf | B | May 29, 2019, 10:41 a.m. | OK | Java 8 | TESTS | 27 | 109 | 0 | 2000 | |
54753861 | dalt | B | May 28, 2019, 2:06 p.m. | OK | Java 8 | TESTS | 27 | 109 | 0 | 2000 | |
54680436 | Nutella3000 | B | May 26, 2019, 4:15 p.m. | OK | Java 8 | TESTS | 27 | 109 | 0 | 2000 | |
65766230 | Keyur21 | B | Nov. 26, 2019, 6:05 p.m. | OK | Java 8 | TESTS | 27 | 124 | 0 | 2000 | |
54841128 | spaceout | B | May 30, 2019, 12:52 p.m. | OK | Java 8 | TESTS | 27 | 124 | 0 | 2000 | |
54697956 | NighTurs | B | May 26, 2019, 8:16 p.m. | OK | Java 8 | TESTS | 27 | 124 | 0 | 2000 | |
62855250 | yaoct | B | Oct. 18, 2019, 9 a.m. | OK | Java 8 | TESTS | 27 | 139 | 0 | 2000 | |
56713691 | LAKOUAM_IMAD | B | July 8, 2019, 1:42 p.m. | OK | Java 8 | TESTS | 27 | 139 | 0 | 2000 | |
54739520 | kotter | B | May 28, 2019, 7:03 a.m. | OK | Kotlin | TESTS | 27 | 124 | 0 | 2000 | |
54681418 | alexey.enkov | B | May 26, 2019, 4:20 p.m. | OK | Kotlin | TESTS | 27 | 186 | 102400 | 2000 | |
54682728 | Intrincantation | B | May 26, 2019, 4:27 p.m. | OK | Kotlin | TESTS | 27 | 265 | 0 | 2000 | |
59092286 | vjudge1 | B | Aug. 19, 2019, 1:06 p.m. | OK | MS C++ | TESTS | 27 | 30 | 307200 | 2000 | |
54881627 | vjudge5 | B | May 31, 2019, 2:40 p.m. | OK | MS C++ | TESTS | 27 | 31 | 307200 | 2000 | |
54846002 | vjudge2 | B | May 30, 2019, 1:56 p.m. | OK | MS C++ | TESTS | 27 | 31 | 307200 | 2000 | |
54682153 | math957963 | B | May 26, 2019, 4:24 p.m. | OK | MS C++ | TESTS | 27 | 31 | 307200 | 2000 | |
61788504 | vjudge5 | B | Oct. 3, 2019, 3:10 p.m. | OK | MS C++ | TESTS | 27 | 46 | 307200 | 2000 | |
58161766 | vjudge5 | B | Aug. 2, 2019, 7:41 a.m. | OK | MS C++ 2017 | TESTS | 27 | 31 | 921600 | 2000 | |
58160604 | vjudge1 | B | Aug. 2, 2019, 7:17 a.m. | OK | MS C++ 2017 | TESTS | 27 | 31 | 921600 | 2000 | |
57600222 | Podolyanochka | B | July 23, 2019, 3:29 p.m. | OK | MS C++ 2017 | TESTS | 27 | 31 | 921600 | 2000 | |
57600207 | Podolyanochka | B | July 23, 2019, 3:29 p.m. | OK | MS C++ 2017 | TESTS | 27 | 46 | 921600 | 2000 | |
55605705 | pseuda | B | June 15, 2019, 10:52 p.m. | OK | MS C++ 2017 | TESTS | 27 | 93 | 921600 | 2000 | |
59618639 | yumtam | B | Aug. 28, 2019, 1:32 p.m. | OK | PyPy 2 | TESTS | 27 | 171 | 7782400 | 2000 | |
59618181 | yumtam | B | Aug. 28, 2019, 1:24 p.m. | OK | PyPy 2 | TESTS | 27 | 186 | 7475200 | 2000 | |
54810290 | phoenix28 | B | May 29, 2019, 4:27 p.m. | OK | PyPy 2 | TESTS | 27 | 343 | 3174400 | 2000 | |
58052339 | _PortgasD.Ace_ | B | July 31, 2019, 3:10 a.m. | OK | PyPy 3 | TESTS | 27 | 171 | 4198400 | 2000 | |
54689957 | titia | B | May 26, 2019, 5:15 p.m. | OK | PyPy 3 | TESTS | 27 | 249 | 8396800 | 2000 | |
54688023 | Kiri8128 | B | May 26, 2019, 5:01 p.m. | OK | PyPy 3 | TESTS | 27 | 280 | 3072000 | 2000 | |
54722155 | whatshisbucket | B | May 27, 2019, 6 p.m. | OK | PyPy 3 | TESTS | 27 | 295 | 42905600 | 2000 | |
63530099 | vjudge5 | B | Oct. 27, 2019, 6:28 a.m. | OK | PyPy 3 | TESTS | 27 | 420 | 9420800 | 2000 | |
54781630 | Stephan | B | May 28, 2019, 10:33 p.m. | OK | PyPy 3 | TESTS | 27 | 436 | 3993600 | 2000 | |
63530056 | neterukun | B | Oct. 27, 2019, 6:27 a.m. | OK | PyPy 3 | TESTS | 27 | 436 | 9523200 | 2000 | |
55190915 | a00920 | B | June 6, 2019, 6:26 a.m. | OK | PyPy 3 | TESTS | 27 | 530 | 6553600 | 2000 | |
54690529 | mathdude42 | B | May 26, 2019, 5:19 p.m. | OK | PyPy 3 | TESTS | 27 | 733 | 13619200 | 2000 | |
54722194 | whatshisbucket | B | May 27, 2019, 6:01 p.m. | OK | Python 3 | TESTS | 27 | 701 | 46080000 | 2000 | |
64085688 | MinecraftFuns | B | Nov. 2, 2019, 11:21 a.m. | OK | Python 3 | TESTS | 27 | 1075 | 9318400 | 2000 | |
55094289 | nexus.chebykin | B | June 4, 2019, 4:12 p.m. | OK | Python 3 | TESTS | 27 | 1075 | 9318400 | 2000 | |
55649170 | sdhd | B | June 16, 2019, 1:42 p.m. | OK | Python 3 | TESTS | 27 | 1153 | 9318400 | 2000 | |
54736271 | Zuizehongquaunha | B | May 28, 2019, 5:10 a.m. | OK | Python 3 | TESTS | 27 | 1247 | 1024000 | 2000 | |
54683779 | EbTech | B | May 26, 2019, 4:33 p.m. | OK | Rust | TESTS | 27 | 31 | 1228800 | 2000 | |
63253661 | sansen | B | Oct. 23, 2019, 4:50 p.m. | OK | Rust | TESTS | 27 | 46 | 2560000 | 2000 | |
67678786 | gearjack | B | Dec. 27, 2019, 4:54 a.m. | OK | Rust | TESTS | 27 | 62 | 2969600 | 2000 | |
54680558 | limed | B | May 26, 2019, 4:16 p.m. | OK | Scala | TESTS | 27 | 577 | 0 | 2000 |
Back to search problems