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 |
|---|---|---|---|---|---|---|
| 11 | Codeforces Beta Round 11 | FINISHED | False | 7200 | 504025180 | April 26, 2010, 3 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 439 ) | E | Forward, march! | PROGRAMMING | binary search dp greedy | 2800 |
Jack has become a soldier now. Unfortunately, he has trouble with the drill. Instead of marching beginning with the left foot and then changing legs with each step, as ordered, he keeps repeating a sequence of steps, in which he sometimes makes the wrong steps or — horror of horrors! — stops for a while. For example, if Jack uses the sequence 'right, left, break', when the sergeant yells: 'Left! Right! Left! Right! Left! Right!', Jack first makes a step with the right foot, then one with the left foot, then he is confused and stops for a moment, then again - this time according to the order - starts with the right foot, then uses the left foot, then - to the sergeant's irritation - he stops to catch his breath, to incorrectly start with the right foot again... Marching this way, Jack will make the step that he is supposed to in the given moment in only one third of cases. When the officers convinced him he should do something about it, Jack decided to modify the basic sequence of steps that he repeats. However, in order not to get too tired, he has decided that the only thing he'll do is adding any number of breaks in any positions of the original sequence (a break corresponds to stopping for the duration of one step). Of course, Jack can't make a step on the same foot twice in a row, if there is no pause between these steps. It is, however, not impossible that the sequence of steps he used so far is incorrect (it would explain a lot, actually). Help Private Jack! Given the sequence of steps he keeps repeating, calculate the maximal percentage of time that he can spend marching correctly after adding some breaks to his scheme. The first line of input contains a sequence consisting only of characters ' L ', ' R ' and ' X ', where ' L ' corresponds to a step with the left foot, ' R ' — with the right foot, and ' X ' — to a break. The length of the sequence will not exceed 10 6 . Output the maximum percentage of time that Jack can spend marching correctly, ro |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 7364033 | hos.lyric | E | Aug. 7, 2014, 12:26 a.m. | OK | D | TESTS | 32 | 498 | 11468800 | 2800 | |
| 17018184 | Dyian | E | March 29, 2016, 11:02 a.m. | OK | GNU C++ | TESTS | 32 | 30 | 5017600 | 2800 | |
| 49478 | vepifanov | E | April 27, 2010, 6:59 p.m. | OK | GNU C++ | TESTS | 32 | 30 | 6348800 | 2800 | |
| 1437289 | tomekkulczynski | E | March 28, 2012, 4:09 p.m. | OK | GNU C++ | TESTS | 32 | 30 | 14438400 | 2800 | |
| 2873418 | weixiao | E | Jan. 4, 2013, 1:37 p.m. | OK | GNU C++ | TESTS | 32 | 31 | 8499200 | 2800 | |
| 3042933 | Ply_py | E | Feb. 1, 2013, 5:39 a.m. | OK | GNU C++ | TESTS | 32 | 46 | 7270400 | 2800 | |
| 1920896 | tavyrikov | E | July 21, 2012, 9:44 p.m. | OK | GNU C++ | TESTS | 32 | 50 | 7372800 | 2800 | |
| 1628721 | TankEngineer | E | April 26, 2012, 7:13 a.m. | OK | GNU C++ | TESTS | 32 | 50 | 9420800 | 2800 | |
| 50021 | krijgertje | E | June 16, 2010, 9:16 a.m. | OK | GNU C++ | TESTS | 32 | 60 | 9420800 | 2800 | |
| 562170 | tmt514 | E | July 23, 2011, 8:14 a.m. | OK | GNU C++ | TESTS | 32 | 60 | 12390400 | 2800 | |
| 49424 | Zhukov_Dmitry | E | April 27, 2010, 12:53 p.m. | OK | GNU C++ | TESTS | 32 | 60 | 12595200 | 2800 | |
| 2469377 | Archon.JK | E | Oct. 30, 2012, 5:45 a.m. | OK | GNU C++0x | TESTS | 32 | 46 | 6758400 | 2800 | |
| 6879082 | zeyuanxy | E | June 13, 2014, 4:22 p.m. | OK | GNU C++0x | TESTS | 32 | 156 | 8601600 | 2800 | |
| 6994348 | ztk | E | July 1, 2014, 11:27 p.m. | OK | GNU C++0x | TESTS | 32 | 186 | 15974400 | 2800 | |
| 5726524 | netkuba | E | Jan. 17, 2014, 9:58 p.m. | OK | GNU C++0x | TESTS | 32 | 684 | 6758400 | 2800 | |
| 19455725 | irkstepanov | E | July 28, 2016, 6:42 a.m. | OK | GNU C11 | TESTS | 32 | 966 | 60416000 | 2800 | |
| 23795166 | jkz | E | Jan. 13, 2017, 11:54 p.m. | OK | GNU C++11 | TESTS | 32 | 92 | 10956800 | 2800 | |
| 20424496 | Nikitosh | E | Sept. 6, 2016, 7:45 p.m. | OK | GNU C++11 | TESTS | 32 | 156 | 9318400 | 2800 | |
| 47026339 | wngdh | E | Dec. 15, 2018, 7:09 a.m. | OK | GNU C++11 | TESTS | 32 | 312 | 6451200 | 2800 | |
| 60049384 | luogu_bot1 | E | Sept. 4, 2019, 11:05 p.m. | OK | GNU C++11 | TESTS | 32 | 312 | 8601600 | 2800 | |
| 57914403 | lopare | E | July 28, 2019, 11:48 p.m. | OK | GNU C++11 | TESTS | 32 | 312 | 8601600 | 2800 | |
| 45252208 | KCSC | E | Nov. 3, 2018, 5:17 p.m. | OK | GNU C++11 | TESTS | 32 | 312 | 8601600 | 2800 | |
| 64375993 | f7oghroo | E | Nov. 6, 2019, 3:12 p.m. | OK | GNU C++11 | TESTS | 32 | 312 | 8601600 | 2800 | |
| 14335359 | KumaTomato | E | Nov. 19, 2015, 12:44 a.m. | OK | GNU C++11 | TESTS | 32 | 312 | 9830400 | 2800 | |
| 58898561 | MinecraftFuns | E | Aug. 16, 2019, 8:23 a.m. | OK | GNU C++11 | TESTS | 32 | 312 | 9830400 | 2800 | |
| 24476136 | theodor.moroianu | E | Feb. 6, 2017, 8:36 p.m. | OK | GNU C++11 | TESTS | 32 | 342 | 8089600 | 2800 | |
| 64904857 | Nikitosh | E | Nov. 14, 2019, 8:59 p.m. | OK | GNU C++14 | TESTS | 32 | 62 | 4505600 | 2800 | |
| 22792514 | ___---___ | E | Dec. 7, 2016, 4:58 p.m. | OK | GNU C++14 | TESTS | 32 | 92 | 7884800 | 2800 | |
| 56627214 | yltx | E | July 6, 2019, 2:32 p.m. | OK | GNU C++14 | TESTS | 32 | 310 | 7680000 | 2800 | |
| 56014527 | sorry_im_smurfing | E | June 24, 2019, 8:09 p.m. | OK | GNU C++14 | TESTS | 32 | 310 | 7680000 | 2800 | |
| 48552155 | haizhe | E | Jan. 19, 2019, 2:41 a.m. | OK | GNU C++14 | TESTS | 32 | 312 | 7680000 | 2800 | |
| 48559410 | Mandir_Wahi_Banayenge | E | Jan. 19, 2019, 6:46 a.m. | OK | GNU C++14 | TESTS | 32 | 312 | 7680000 | 2800 | |
| 58812438 | thebes | E | Aug. 14, 2019, 11:20 a.m. | OK | GNU C++14 | TESTS | 32 | 342 | 8908800 | 2800 | |
| 35076567 | shiyanrui | E | Feb. 9, 2018, 3:02 a.m. | OK | GNU C++14 | TESTS | 32 | 342 | 10752000 | 2800 | |
| 57151494 | icecuber | E | July 16, 2019, 2:58 p.m. | OK | GNU C++14 | TESTS | 32 | 686 | 2150400 | 2800 | |
| 24995570 | hpfdf | E | Feb. 24, 2017, 8:35 p.m. | OK | GNU C++14 | TESTS | 32 | 686 | 2969600 | 2800 | |
| 58521616 | Benq | E | Aug. 10, 2019, 5:04 a.m. | OK | GNU C++17 | TESTS | 32 | 92 | 6656000 | 2800 | |
| 65201553 | ivan100sic | E | Nov. 16, 2019, 4:09 p.m. | OK | GNU C++17 | TESTS | 32 | 842 | 4300800 | 2800 | |
| 69288710 | hjk1030 | E | Jan. 22, 2020, 9:18 a.m. | OK | GNU C++17 | TESTS | 32 | 904 | 38707200 | 2800 | |
| 48777 | Petr | E | April 26, 2010, 5:02 p.m. | OK | Java 6 | TESTS | 32 | 110 | 32051200 | 2800 | |
| 9274649 | Mintoo | E | Dec. 26, 2014, 10:44 a.m. | OK | Java 6 | TESTS | 32 | 186 | 0 | 2800 | |
| 657152 | OgieKako | E | Sept. 3, 2011, 11:45 a.m. | OK | Java 6 | TESTS | 32 | 200 | 37580800 | 2800 | |
| 9274624 | Mintoo | E | Dec. 26, 2014, 10:39 a.m. | OK | Java 6 | TESTS | 32 | 216 | 0 | 2800 | |
| 49444 | vot | E | April 27, 2010, 1:49 p.m. | OK | Java 6 | TESTS | 32 | 220 | 43212800 | 2800 | |
| 49437 | vot | E | April 27, 2010, 1:30 p.m. | OK | Java 6 | TESTS | 32 | 220 | 43212800 | 2800 | |
| 49197 | yiuyuho | E | April 27, 2010, 3:38 a.m. | OK | Java 6 | TESTS | 32 | 340 | 39116800 | 2800 | |
| 49074 | ivan.metelsky | E | April 26, 2010, 8:36 p.m. | OK | Java 6 | TESTS | 32 | 520 | 42086400 | 2800 | |
| 10816711 | dspstanky | E | April 21, 2015, 9:13 p.m. | OK | Java 7 | TESTS | 32 | 218 | 50073600 | 2800 | |
| 8351724 | darrensun | E | Oct. 22, 2014, 12:43 p.m. | OK | Java 7 | TESTS | 32 | 280 | 2457600 | 2800 | |
| 4762241 | bendyna.ivan | E | Oct. 12, 2013, 10:20 p.m. | OK | Java 7 | TESTS | 32 | 872 | 2355200 | 2800 | |
| 17391128 | mkirsche | E | April 19, 2016, 6:30 p.m. | OK | Java 8 | TESTS | 32 | 278 | 36966400 | 2800 | |
| 11696269 | Slayer_29 | E | June 21, 2015, 12:08 p.m. | OK | Java 8 | TESTS | 32 | 342 | 9728000 | 2800 | |
| 17391172 | mkirsche | E | April 19, 2016, 6:36 p.m. | OK | Java 8 | TESTS | 32 | 468 | 33484800 | 2800 | |
| 10924218 | ProjectYoung | E | April 29, 2015, 12:23 a.m. | OK | Java 8 | TESTS | 32 | 622 | 40857600 | 2800 | |
| 9286733 | halyavin | E | Dec. 27, 2014, 7:08 p.m. | OK | Java 8 | TESTS | 32 | 966 | 0 | 2800 | |
| 27226790 | tbuzzelli | E | May 20, 2017, 2:34 a.m. | OK | Java 8 | TESTS | 32 | 966 | 3686400 | 2800 | |
| 48635 | SergeyRogulenko | E | April 26, 2010, 4:53 p.m. | OK | MS C++ | TESTS | 32 | 60 | 7372800 | 2800 | |
| 2468967 | numitus | E | Oct. 30, 2012, 12:21 a.m. | OK | MS C++ | TESTS | 32 | 62 | 8294400 | 2800 | |
| 2468964 | numitus | E | Oct. 30, 2012, 12:19 a.m. | OK | MS C++ | TESTS | 32 | 62 | 8294400 | 2800 | |
| 402687 | stostap | E | April 19, 2011, 10:07 p.m. | OK | MS C++ | TESTS | 32 | 80 | 24166400 | 2800 | |
| 248626 | RAVEman | E | Jan. 13, 2011, 7:22 p.m. | OK | MS C++ | TESTS | 32 | 110 | 6656000 | 2800 | |
| 256169 | agul | E | Jan. 21, 2011, 12:38 p.m. | OK | MS C++ | TESTS | 32 | 140 | 6758400 | 2800 | |
| 49395 | AChudov | E | April 27, 2010, 11:23 a.m. | OK | MS C++ | TESTS | 32 | 170 | 8294400 | 2800 | |
| 50109 | Coder | E | July 24, 2010, 10:07 a.m. | OK | MS C++ | TESTS | 32 | 590 | 20377600 | 2800 | |
| 7658156 | ShingRay | E | Sept. 1, 2014, 4:11 a.m. | OK | Ocaml | TESTS | 32 | 62 | 13824000 | 2800 | |
| 11095790 | darrensun | E | May 14, 2015, 7:15 a.m. | OK | PyPy 3 | TESTS | 32 | 778 | 44544000 | 2800 |
Back to search problems