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 |
---|---|---|---|---|---|---|
103 | Codeforces Beta Round 80 (Div. 1 Only) | FINISHED | False | 7200 | 425242751 | Aug. 7, 2011, 11 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 969 ) | C | Russian Roulette | PROGRAMMING | constructive algorithms greedy | 1900 |
B'After all the events in Orlando we all know, Sasha and Roma decided to find out who is still the team 's biggest loser. Thankfully, Masha found somewhere a revolver with a rotating cylinder of n bullet slots able to contain exactly k bullets, now the boys have a chance to resolve the problem once and for all. Sasha selects any k out of n slots he wishes and puts bullets there. Roma spins the cylinder so that every of n possible cylinder 's shifts is equiprobable. Then the game starts, the players take turns, Sasha starts: he puts the gun to his head and shoots. If there was no bullet in front of the trigger, the cylinder shifts by one position and the weapon is given to Roma for make the same move. The game continues until someone is shot, the survivor is the winner. Sasha does not want to lose, so he must choose slots for bullets in such a way as to minimize the probability of its own loss. Of all the possible variant he wants to select the lexicographically minimal one, where an empty slot is lexicographically less than a charged one. More formally, the cylinder of n bullet slots able to contain k bullets can be represented as a string of n characters. Exactly k of them are "X" (charged slots) and the others are "." (uncharged slots). Let us describe the process of a shot. Suppose that the trigger is in front of the first character of the string (the first slot). If a shot doesn 't kill anyone and the cylinder shifts, then the string shifts left. So the first character becomes the last one, the second character becomes the first one, and so on. But the trigger doesn 't move. It will be in front of the first character of the resulting string. Among all the strings that give the minimal probability of loss, Sasha choose the lexicographically minimal one. According to this very string, he charges the gun. You have to help Sasha to charge the gun. For that, each xi query must be answered: is there a bullet in the positions xi? The first line contains three i'... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
4267385 | Misha100896 | C | Aug. 11, 2013, 9:44 p.m. | OK | Delphi | TESTS | 70 | 30 | 0 | 1900 | |
600119 | Nikolai | C | Aug. 9, 2011, 9:47 a.m. | OK | Delphi | TESTS | 70 | 30 | 819200 | 1900 | |
1382024 | zanoes | C | March 20, 2012, 1:42 p.m. | OK | Delphi | TESTS | 70 | 30 | 819200 | 1900 | |
601517 | Depool | C | Aug. 10, 2011, 8:04 a.m. | OK | Delphi | TESTS | 70 | 30 | 819200 | 1900 | |
595053 | watson | C | Aug. 7, 2011, 12:50 p.m. | OK | Delphi | TESTS | 70 | 30 | 921600 | 1900 | |
599166 | ruban | C | Aug. 8, 2011, 4:21 p.m. | OK | Delphi | TESTS | 70 | 30 | 921600 | 1900 | |
598242 | alexander-nsk94 | C | Aug. 8, 2011, 9:37 a.m. | OK | Delphi | TESTS | 70 | 30 | 921600 | 1900 | |
594251 | kontr | C | Aug. 7, 2011, 12:30 p.m. | OK | Delphi | TESTS | 70 | 30 | 921600 | 1900 | |
593200 | sankear | C | Aug. 7, 2011, 12:03 p.m. | OK | Delphi | TESTS | 70 | 30 | 2969600 | 1900 | |
863401 | Shapo | C | Nov. 14, 2011, 1:56 p.m. | OK | Delphi | TESTS | 70 | 50 | 921600 | 1900 | |
3469615 | Um_nik | C | April 3, 2013, 3:19 p.m. | OK | FPC | TESTS | 70 | 15 | 0 | 1900 | |
639952 | vlad107 | C | Aug. 27, 2011, 11:56 a.m. | OK | FPC | TESTS | 70 | 30 | 1024000 | 1900 | |
1388500 | sillycross | C | March 23, 2012, 6:57 a.m. | OK | FPC | TESTS | 70 | 30 | 1024000 | 1900 | |
890444 | coolinging | C | Nov. 25, 2011, 5:17 a.m. | OK | FPC | TESTS | 70 | 30 | 1024000 | 1900 | |
739419 | giongto35 | C | Oct. 6, 2011, 12:21 p.m. | OK | FPC | TESTS | 70 | 30 | 1024000 | 1900 | |
595848 | xujie | C | Aug. 7, 2011, 2:09 p.m. | OK | FPC | TESTS | 70 | 30 | 1024000 | 1900 | |
595594 | Sereja | C | Aug. 7, 2011, 1:53 p.m. | OK | FPC | TESTS | 70 | 30 | 1024000 | 1900 | |
593287 | Sereja | C | Aug. 7, 2011, 12:05 p.m. | OK | FPC | TESTS | 70 | 30 | 1024000 | 1900 | |
750877 | superpear | C | Oct. 8, 2011, 11:59 a.m. | OK | FPC | TESTS | 70 | 30 | 1126400 | 1900 | |
595931 | ruban | C | Aug. 7, 2011, 2:24 p.m. | OK | FPC | TESTS | 70 | 30 | 1126400 | 1900 | |
990608 | Sender | C | Dec. 29, 2011, 9:15 a.m. | OK | GNU C | TESTS | 70 | 30 | 1331200 | 1900 | |
753710 | kawatea | C | Oct. 10, 2011, 5:23 a.m. | OK | GNU C | TESTS | 70 | 30 | 1331200 | 1900 | |
595587 | eduardische | C | Aug. 7, 2011, 1:53 p.m. | OK | GNU C | TESTS | 70 | 30 | 1331200 | 1900 | |
34941420 | uday_170030900 | C | Feb. 5, 2018, 10:56 a.m. | OK | GNU C | TESTS | 70 | 30 | 1843200 | 1900 | |
4031823 | nealzane | C | July 6, 2013, 4:44 p.m. | OK | GNU C++ | TESTS | 70 | 15 | 0 | 1900 | |
3917584 | ShadowSong | C | June 19, 2013, 12:48 p.m. | OK | GNU C++ | TESTS | 70 | 15 | 0 | 1900 | |
3555231 | vici | C | April 17, 2013, 7:30 a.m. | OK | GNU C++ | TESTS | 70 | 15 | 0 | 1900 | |
2958134 | vjudge5 | C | Jan. 19, 2013, 2:27 a.m. | OK | GNU C++ | TESTS | 70 | 15 | 0 | 1900 | |
15831966 | vjudge2 | C | Feb. 5, 2016, 7:15 p.m. | OK | GNU C++ | TESTS | 70 | 30 | 0 | 1900 | |
18988339 | Tiny | C | July 9, 2016, 3:26 p.m. | OK | GNU C++ | TESTS | 70 | 30 | 0 | 1900 | |
15831939 | PedramAghazadeh | C | Feb. 5, 2016, 7:13 p.m. | OK | GNU C++ | TESTS | 70 | 30 | 0 | 1900 | |
15142004 | HappyNewYearMike | C | Dec. 31, 2015, 10:01 p.m. | OK | GNU C++ | TESTS | 70 | 30 | 0 | 1900 | |
15080795 | vjudge4 | C | Dec. 29, 2015, 7:19 a.m. | OK | GNU C++ | TESTS | 70 | 30 | 0 | 1900 | |
14995175 | vjudge5 | C | Dec. 24, 2015, 9 p.m. | OK | GNU C++ | TESTS | 70 | 30 | 0 | 1900 | |
655981 | Archon.JK | C | Sept. 2, 2011, 2:03 p.m. | OK | GNU C++0x | TESTS | 70 | 30 | 1331200 | 1900 | |
873415 | PattS | C | Nov. 16, 2011, 8:34 a.m. | OK | GNU C++0x | TESTS | 70 | 30 | 1433600 | 1900 | |
597779 | package.zaic | C | Aug. 8, 2011, 6:24 a.m. | OK | GNU C++0x | TESTS | 70 | 30 | 1433600 | 1900 | |
596196 | subscriber | C | Aug. 7, 2011, 2:45 p.m. | OK | GNU C++0x | TESTS | 70 | 30 | 1433600 | 1900 | |
596033 | siuvit | C | Aug. 7, 2011, 2:30 p.m. | OK | GNU C++0x | TESTS | 70 | 30 | 1433600 | 1900 | |
595622 | kamranm | C | Aug. 7, 2011, 1:54 p.m. | OK | GNU C++0x | TESTS | 70 | 30 | 1433600 | 1900 | |
594383 | kamranm | C | Aug. 7, 2011, 12:33 p.m. | OK | GNU C++0x | TESTS | 70 | 30 | 1433600 | 1900 | |
6646761 | marat.snowbear | C | May 18, 2014, 2:37 a.m. | OK | GNU C++0x | TESTS | 70 | 60 | 0 | 1900 | |
10175710 | SWATMaD | C | March 6, 2015, 10:43 a.m. | OK | GNU C++0x | TESTS | 70 | 62 | 0 | 1900 | |
9561837 | BigBag | C | Jan. 26, 2015, 3:07 p.m. | OK | GNU C++0x | TESTS | 70 | 62 | 0 | 1900 | |
26035799 | magieNoire | C | March 31, 2017, 8:43 p.m. | OK | GNU C11 | TESTS | 70 | 62 | 1945600 | 1900 | |
27716329 | 423555290 | C | June 11, 2017, 6:57 a.m. | OK | GNU C++11 | TESTS | 70 | 30 | 0 | 1900 | |
19458041 | a540524095 | C | July 28, 2016, 9:01 a.m. | OK | GNU C++11 | TESTS | 70 | 30 | 0 | 1900 | |
15728690 | vjudge5 | C | Feb. 1, 2016, 10:10 a.m. | OK | GNU C++11 | TESTS | 70 | 30 | 0 | 1900 | |
15344836 | dkjsfkhg | C | Jan. 14, 2016, 1:33 p.m. | OK | GNU C++11 | TESTS | 70 | 30 | 0 | 1900 | |
15059636 | Batman | C | Dec. 27, 2015, 5:44 p.m. | OK | GNU C++11 | TESTS | 70 | 30 | 0 | 1900 | |
14995169 | Mohammad.Sj | C | Dec. 24, 2015, 8:59 p.m. | OK | GNU C++11 | TESTS | 70 | 30 | 0 | 1900 | |
14908862 | vjudge3 | C | Dec. 21, 2015, 8:34 a.m. | OK | GNU C++11 | TESTS | 70 | 30 | 0 | 1900 | |
14908851 | Navick | C | Dec. 21, 2015, 8:33 a.m. | OK | GNU C++11 | TESTS | 70 | 30 | 0 | 1900 | |
14904490 | kastarika | C | Dec. 20, 2015, 8:31 p.m. | OK | GNU C++11 | TESTS | 70 | 30 | 0 | 1900 | |
21799577 | newbiek92 | C | Oct. 26, 2016, 3:58 p.m. | OK | GNU C++11 | TESTS | 70 | 30 | 0 | 1900 | |
27161743 | vjudge3 | C | May 16, 2017, 2:26 p.m. | OK | GNU C++14 | TESTS | 70 | 30 | 0 | 1900 | |
27161718 | ConnorZhong | C | May 16, 2017, 2:25 p.m. | OK | GNU C++14 | TESTS | 70 | 30 | 0 | 1900 | |
32119237 | Mahi1704 | C | Nov. 7, 2017, 12:39 p.m. | OK | GNU C++14 | TESTS | 70 | 30 | 0 | 1900 | |
36083352 | loyolman | C | March 8, 2018, 10:56 p.m. | OK | GNU C++14 | TESTS | 70 | 30 | 1945600 | 1900 | |
32986137 | wewark | C | Dec. 6, 2017, 7:47 p.m. | OK | GNU C++14 | TESTS | 70 | 30 | 1945600 | 1900 | |
32932379 | vamsi3 | C | Dec. 4, 2017, 6:31 p.m. | OK | GNU C++14 | TESTS | 70 | 30 | 1945600 | 1900 | |
31605826 | jvj_iit | C | Oct. 22, 2017, 1:57 p.m. | OK | GNU C++14 | TESTS | 70 | 30 | 1945600 | 1900 | |
26814935 | vjudge3 | C | May 3, 2017, 8:07 a.m. | OK | GNU C++14 | TESTS | 70 | 30 | 1945600 | 1900 | |
25393965 | Neverknow | C | March 11, 2017, 5:45 a.m. | OK | GNU C++14 | TESTS | 70 | 30 | 1945600 | 1900 | |
24269554 | KhaledKEE | C | Jan. 30, 2017, 2:34 p.m. | OK | GNU C++14 | TESTS | 70 | 30 | 1945600 | 1900 | |
69403449 | mahdi.hasnat | C | Jan. 23, 2020, 10 a.m. | OK | GNU C++17 | TESTS | 70 | 62 | 0 | 1900 | |
69297921 | Pippinpaddleopsicopolis | C | Jan. 22, 2020, 12:52 p.m. | OK | GNU C++17 | TESTS | 70 | 62 | 0 | 1900 | |
59899603 | .I. | C | Sept. 2, 2019, 1:14 p.m. | OK | GNU C++17 | TESTS | 70 | 62 | 0 | 1900 | |
55671488 | Photon_ | C | June 17, 2019, 7:51 a.m. | OK | GNU C++17 | TESTS | 70 | 62 | 0 | 1900 | |
55324435 | aaryandosaj | C | June 9, 2019, 7:06 a.m. | OK | GNU C++17 | TESTS | 70 | 62 | 0 | 1900 | |
52890134 | DanWarren | C | April 17, 2019, 7:27 a.m. | OK | GNU C++17 | TESTS | 70 | 62 | 0 | 1900 | |
49994571 | abhishek_20123 | C | Feb. 16, 2019, 2:19 p.m. | OK | GNU C++17 | TESTS | 70 | 62 | 0 | 1900 | |
47315721 | Shizuo | C | Dec. 21, 2018, 3:06 a.m. | OK | GNU C++17 | TESTS | 70 | 62 | 0 | 1900 | |
47260992 | karansiwach360 | C | Dec. 19, 2018, 12:22 p.m. | OK | GNU C++17 | TESTS | 70 | 62 | 0 | 1900 | |
69589089 | ffao | C | Jan. 26, 2020, 9:32 p.m. | OK | GNU C++17 | TESTS | 70 | 62 | 0 | 1900 | |
594199 | bjin | C | Aug. 7, 2011, 12:28 p.m. | OK | Haskell | TESTS | 70 | 30 | 2150400 | 1900 | |
612603 | CindyLinz | C | Aug. 16, 2011, 5:23 a.m. | OK | Haskell | TESTS | 70 | 50 | 3174400 | 1900 | |
593988 | mipt.vi002 | C | Aug. 7, 2011, 12:23 p.m. | OK | Haskell | TESTS | 70 | 50 | 3174400 | 1900 | |
596440 | Egor | C | Aug. 7, 2011, 3:11 p.m. | OK | Java 6 | TESTS | 70 | 90 | 43008000 | 1900 | |
594898 | tehqin | C | Aug. 7, 2011, 12:47 p.m. | OK | Java 6 | TESTS | 70 | 90 | 43008000 | 1900 | |
3313869 | hs484 | C | March 14, 2013, 5:27 a.m. | OK | Java 6 | TESTS | 70 | 93 | 0 | 1900 | |
624231 | anhdt | C | Aug. 21, 2011, 5:43 a.m. | OK | Java 6 | TESTS | 70 | 110 | 35225600 | 1900 | |
605141 | OgieKako | C | Aug. 13, 2011, 1:25 p.m. | OK | Java 6 | TESTS | 70 | 110 | 35328000 | 1900 | |
597803 | pius_88 | C | Aug. 8, 2011, 6:37 a.m. | OK | Java 6 | TESTS | 70 | 110 | 35328000 | 1900 | |
593747 | Rasifiel | C | Aug. 7, 2011, 12:16 p.m. | OK | Java 6 | TESTS | 70 | 110 | 43008000 | 1900 | |
592489 | mmaxio | C | Aug. 7, 2011, 11:46 a.m. | OK | Java 6 | TESTS | 70 | 110 | 43008000 | 1900 | |
597412 | Aksenov239 | C | Aug. 7, 2011, 7:02 p.m. | OK | Java 6 | TESTS | 70 | 110 | 43110400 | 1900 | |
593140 | SergeyLazarev | C | Aug. 7, 2011, 12:01 p.m. | OK | Java 6 | TESTS | 70 | 110 | 43110400 | 1900 | |
16306295 | alibaba | C | Feb. 24, 2016, 9:45 a.m. | OK | Java 8 | TESTS | 70 | 278 | 0 | 1900 | |
8645494 | AlexFetisov | C | Nov. 11, 2014, 5:33 a.m. | OK | Java 8 | TESTS | 70 | 342 | 204800 | 1900 | |
594662 | tanzaku | C | Aug. 7, 2011, 12:41 p.m. | OK | Mono C# | TESTS | 70 | 130 | 5632000 | 1900 | |
596380 | Scalar | C | Aug. 7, 2011, 3:04 p.m. | OK | Mono C# | TESTS | 70 | 140 | 5734400 | 1900 | |
3530675 | binwin20 | C | April 14, 2013, 2:57 a.m. | OK | MS C++ | TESTS | 70 | 15 | 0 | 1900 | |
2938906 | Dabek | C | Jan. 16, 2013, 3:42 p.m. | OK | MS C++ | TESTS | 70 | 15 | 0 | 1900 | |
12027595 | Maks_DP | C | July 13, 2015, 9:44 a.m. | OK | MS C++ | TESTS | 70 | 30 | 0 | 1900 | |
2070774 | Timur_Sitdikov | C | Aug. 31, 2012, 6:40 a.m. | OK | MS C++ | TESTS | 70 | 30 | 716800 | 1900 | |
598163 | huhuuuhfrl | C | Aug. 8, 2011, 8:54 a.m. | OK | MS C++ | TESTS | 70 | 30 | 1331200 | 1900 | |
596015 | P___ | C | Aug. 7, 2011, 2:29 p.m. | OK | MS C++ | TESTS | 70 | 30 | 1331200 | 1900 | |
929779 | Fdg | C | Dec. 4, 2011, 3:59 p.m. | OK | MS C++ | TESTS | 70 | 30 | 1433600 | 1900 | |
769986 | libssl | C | Oct. 16, 2011, 6:11 p.m. | OK | MS C++ | TESTS | 70 | 30 | 1433600 | 1900 | |
1243258 | soundsdx | C | Feb. 29, 2012, 11 a.m. | OK | MS C++ | TESTS | 70 | 30 | 1433600 | 1900 | |
1810492 | rinigan | C | June 19, 2012, 3:28 p.m. | OK | MS C++ | TESTS | 70 | 30 | 1433600 | 1900 | |
58512497 | CtrlAlt | C | Aug. 9, 2019, 7:56 p.m. | OK | MS C++ 2017 | TESTS | 70 | 62 | 0 | 1900 | |
56017559 | sorry_im_smurfing | C | June 24, 2019, 10:49 p.m. | OK | MS C++ 2017 | TESTS | 70 | 62 | 0 | 1900 | |
597573 | insane | C | Aug. 7, 2011, 10:45 p.m. | OK | Python 2 | TESTS | 70 | 60 | 2867200 | 1900 | |
595812 | sqybi | C | Aug. 7, 2011, 2:06 p.m. | OK | Python 2 | TESTS | 70 | 60 | 2867200 | 1900 | |
595804 | fanatid | C | Aug. 7, 2011, 2:06 p.m. | OK | Python 2 | TESTS | 70 | 60 | 2867200 | 1900 | |
593843 | sevenkplus | C | Aug. 7, 2011, 12:19 p.m. | OK | Python 2 | TESTS | 70 | 60 | 2867200 | 1900 | |
604946 | Martial | C | Aug. 13, 2011, 11:12 a.m. | OK | Python 2 | TESTS | 70 | 80 | 2867200 | 1900 | |
600427 | camapaojiekca | C | Aug. 9, 2011, 1:17 p.m. | OK | Python 2 | TESTS | 70 | 80 | 2867200 | 1900 | |
857512 | kien_metalrock | C | Nov. 11, 2011, 7:54 a.m. | OK | Python 2 | TESTS | 70 | 130 | 3891200 | 1900 | |
593028 | Gassa | C | Aug. 7, 2011, 11:59 a.m. | OK | Python 2 | TESTS | 70 | 130 | 3891200 | 1900 | |
28787663 | YazanRi | C | July 22, 2017, 10:25 p.m. | OK | Python 3 | TESTS | 70 | 154 | 4608000 | 1900 | |
42134357 | Mk_Python_v1 | C | Aug. 26, 2018, 9:44 p.m. | OK | Python 3 | TESTS | 70 | 280 | 0 | 1900 |
Back to search problems