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 |
|---|---|---|---|---|---|---|
| 98 | Codeforces Beta Round 78 (Div. 1 Only) | FINISHED | False | 7200 | 465058823 | July 22, 2011, 3 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 152 ) | B | Help King | PROGRAMMING | implementation probabilities trees | 2600 |
This is the modification of the problem used during the official round. Unfortunately, author's solution of the original problem appeared wrong, so the problem was changed specially for the archive. Once upon a time in a far away kingdom lived the King. The King had a beautiful daughter, Victoria. They lived happily, but not happily ever after: one day a vicious dragon attacked the kingdom and stole Victoria. The King was full of grief, yet he gathered his noble knights and promised half of his kingdom and Victoria's hand in marriage to the one who will save the girl from the infernal beast. Having travelled for some time, the knights found the dragon's lair and all of them rushed there to save Victoria. Each knight spat on the dragon once and, as the dragon had quite a fragile and frail heart, his heart broke and poor beast died. As for the noble knights, they got Victoria right to the King and started brawling as each one wanted the girl's hand in marriage. The problem was that all the noble knights were equally noble and equally handsome, and Victoria didn't want to marry any of them anyway. Then the King (and he was a very wise man and didn't want to hurt anybody's feelings) decided to find out who will get his daughter randomly, i.e. tossing a coin. However, there turned out to be n noble knights and the coin only has two sides. The good thing is that when a coin is tossed, the coin falls on each side with equal probability. The King got interested how to pick one noble knight using this coin so that all knights had equal probability of being chosen (the probability in that case should always be equal to 1 / n ). First the King wants to know the expected number of times he will need to toss a coin to determine the winner. Besides, while tossing the coin, the King should follow the optimal tossing strategy (i.e. the strategy that minimizes the expected number of tosses). Help the King in this challenging task. The first line contains a single integer n |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 985207 | waterkid | B | Dec. 25, 2011, 10:32 a.m. | OK | FPC | TESTS | 100 | 1000 | 1126400 | 2600 | |
| 984463 | wayne-ho | B | Dec. 25, 2011, 3:15 a.m. | OK | GNU C++ | TESTS | 100 | 270 | 1433600 | 2600 | |
| 3856625 | zhj | B | June 11, 2013, 8:54 a.m. | OK | GNU C++ | TESTS | 100 | 750 | 204800 | 2600 | |
| 14707118 | -snowman- | B | Dec. 9, 2015, 6:43 a.m. | OK | GNU C++ | TESTS | 100 | 966 | 102400 | 2600 | |
| 14193336 | 130705009 | B | Nov. 11, 2015, 7:16 a.m. | OK | GNU C++ | TESTS | 100 | 966 | 102400 | 2600 | |
| 1099332 | Komaki | B | Jan. 21, 2012, 2:43 p.m. | OK | GNU C++ | TESTS | 100 | 1420 | 124211200 | 2600 | |
| 52514260 | fmrozaqi | B | April 9, 2019, 3:38 a.m. | OK | GNU C++11 | TESTS | 100 | 810 | 102400 | 2600 | |
| 40920465 | zhouyuyang | B | July 29, 2018, 2:22 p.m. | OK | GNU C++11 | TESTS | 100 | 810 | 102400 | 2600 | |
| 52514288 | fmrozaqi | B | April 9, 2019, 3:40 a.m. | OK | GNU C++11 | TESTS | 100 | 840 | 102400 | 2600 | |
| 52514277 | fmrozaqi | B | April 9, 2019, 3:39 a.m. | OK | GNU C++11 | TESTS | 100 | 840 | 102400 | 2600 | |
| 16829914 | freebsdx | B | March 20, 2016, 2:06 a.m. | OK | GNU C++11 | TESTS | 100 | 998 | 2252800 | 2600 | |
| 15316605 | sid02 | B | Jan. 12, 2016, 2:04 p.m. | OK | GNU C++11 | TESTS | 100 | 1340 | 102400 | 2600 | |
| 67731896 | mota_haathi | B | Dec. 27, 2019, 3:49 p.m. | OK | GNU C++14 | TESTS | 100 | 248 | 0 | 2600 | |
| 66084331 | rfpermen | B | Dec. 1, 2019, 3:18 a.m. | OK | GNU C++14 | TESTS | 100 | 248 | 307200 | 2600 | |
| 57467717 | upobir | B | July 21, 2019, 4:22 p.m. | OK | GNU C++14 | TESTS | 100 | 278 | 204800 | 2600 | |
| 33612098 | Ahnaf.Shahriar.Asif | B | Dec. 25, 2017, 8:47 a.m. | OK | GNU C++14 | TESTS | 100 | 966 | 2150400 | 2600 | |
| 31631735 | hahavodox | B | Oct. 23, 2017, 2:07 p.m. | OK | GNU C++14 | TESTS | 100 | 966 | 2150400 | 2600 | |
| 23671525 | Ali.Pi | B | Jan. 9, 2017, 9:49 p.m. | OK | GNU C++14 | TESTS | 100 | 966 | 2150400 | 2600 | |
| 38334818 | DeshiBasara | B | May 16, 2018, 11:39 p.m. | OK | GNU C++14 | TESTS | 100 | 966 | 3584000 | 2600 | |
| 57466370 | upobir | B | July 21, 2019, 3:45 p.m. | OK | GNU C++14 | TESTS | 100 | 1590 | 204800 | 2600 | |
| 65870906 | WangJialei | B | Nov. 27, 2019, 3:49 p.m. | OK | Go | TESTS | 100 | 62 | 0 | 2600 | |
| 65871032 | vjudge5 | B | Nov. 27, 2019, 3:53 p.m. | OK | Go | TESTS | 100 | 92 | 0 | 2600 | |
| 17802437 | fqw | B | May 8, 2016, 5:05 a.m. | OK | Haskell | TESTS | 100 | 62 | 56627200 | 2600 | |
| 17802860 | fqw | B | May 8, 2016, 5:47 a.m. | OK | Haskell | TESTS | 100 | 62 | 56729600 | 2600 | |
| 603320 | uwi | B | Aug. 11, 2011, 9:26 p.m. | OK | Java 6 | TESTS | 100 | 220 | 44748800 | 2600 | |
| 567764 | Kenny_HORROR | B | July 27, 2011, 10:49 p.m. | OK | Java 6 | TESTS | 100 | 390 | 43212800 | 2600 | |
| 711836 | kennethsnow | B | Sept. 22, 2011, 11:02 a.m. | OK | Java 6 | TESTS | 100 | 440 | 35430400 | 2600 | |
| 711834 | vjudge4 | B | Sept. 22, 2011, 11 a.m. | OK | Java 6 | TESTS | 100 | 450 | 35430400 | 2600 | |
| 568509 | Igor_Kudryashov | B | July 28, 2011, 3:42 p.m. | OK | Java 6 | TESTS | 100 | 470 | 43212800 | 2600 | |
| 935604 | Marloc | B | Dec. 8, 2011, 1:03 p.m. | OK | Java 6 | TESTS | 100 | 480 | 35532800 | 2600 | |
| 1046920 | ztk | B | Jan. 15, 2012, 5:36 p.m. | OK | Java 6 | TESTS | 100 | 550 | 43212800 | 2600 | |
| 567882 | sevenkplus | B | July 28, 2011, 3:51 a.m. | OK | Java 6 | TESTS | 100 | 1140 | 88780800 | 2600 | |
| 567676 | Connector | B | July 27, 2011, 7:56 p.m. | OK | Java 6 | TESTS | 100 | 1250 | 88576000 | 2600 | |
| 12250939 | Irkutsk_ISRU | B | July 28, 2015, 11:06 a.m. | OK | Java 7 | TESTS | 100 | 622 | 0 | 2600 | |
| 40249031 | ruo | B | July 13, 2018, 4:27 a.m. | OK | Java 8 | TESTS | 100 | 436 | 0 | 2600 | |
| 42680429 | KulikAlex | B | Sept. 8, 2018, 4:05 p.m. | OK | Java 8 | TESTS | 100 | 592 | 0 | 2600 | |
| 36421906 | SAeed | B | March 19, 2018, 11:05 p.m. | OK | Java 8 | TESTS | 100 | 1122 | 21504000 | 2600 | |
| 10796752 | delta_4d | B | April 20, 2015, 11:06 a.m. | OK | Java 8 | TESTS | 100 | 1402 | 29388800 | 2600 | |
| 17702844 | alexrcoleman | B | May 3, 2016, 9:24 p.m. | OK | Java 8 | TESTS | 100 | 1528 | 22220800 | 2600 | |
| 46465089 | .vr | B | Dec. 2, 2018, 1:55 a.m. | OK | Java 8 | TESTS | 100 | 1558 | 0 | 2600 | |
| 59834985 | saketh | B | Sept. 1, 2019, 3:12 a.m. | OK | PyPy 2 | TESTS | 100 | 654 | 7782400 | 2600 | |
| 584546 | sung71 | B | Aug. 4, 2011, 10:10 a.m. | OK | Python 2 | TESTS | 100 | 310 | 3584000 | 2600 | |
| 15143632 | HappyNewYearMike | B | Dec. 31, 2015, 11:27 p.m. | OK | Python 2 | TESTS | 100 | 404 | 921600 | 2600 | |
| 14318372 | VastoLorde95 | B | Nov. 17, 2015, 8:35 p.m. | OK | Python 2 | TESTS | 100 | 530 | 33075200 | 2600 | |
| 14318386 | VastoLorde95 | B | Nov. 17, 2015, 8:36 p.m. | OK | Python 2 | TESTS | 100 | 560 | 33075200 | 2600 | |
| 59834957 | saketh | B | Sept. 1, 2019, 3:11 a.m. | OK | Python 2 | TESTS | 100 | 716 | 5324800 | 2600 | |
| 587551 | sbzlyessit | B | Aug. 6, 2011, 6:53 a.m. | OK | Python 2 | TESTS | 100 | 840 | 7680000 | 2600 | |
| 574503 | cgy4ever | B | Aug. 1, 2011, 6:55 a.m. | OK | Python 2 | TESTS | 100 | 1170 | 3174400 | 2600 | |
| 3857686 | dhh1995 | B | June 11, 2013, 1:45 p.m. | OK | Python 3 | TESTS | 100 | 296 | 5324800 | 2600 | |
| 35899360 | ______u______ | B | March 3, 2018, 6:33 p.m. | OK | Python 3 | TESTS | 100 | 342 | 6963200 | 2600 | |
| 35898944 | _____k_____ | B | March 3, 2018, 6:31 p.m. | OK | Python 3 | TESTS | 100 | 342 | 6963200 | 2600 | |
| 35898680 | _____i_____ | B | March 3, 2018, 6:22 p.m. | OK | Python 3 | TESTS | 100 | 342 | 6963200 | 2600 | |
| 35898648 | ______n______ | B | March 3, 2018, 6:21 p.m. | OK | Python 3 | TESTS | 100 | 342 | 6963200 | 2600 | |
| 35893001 | ______h______ | B | March 3, 2018, 3:39 p.m. | OK | Python 3 | TESTS | 100 | 342 | 6963200 | 2600 | |
| 15914794 | not_bot_but_POT | B | Feb. 9, 2016, 1:53 p.m. | OK | Python 3 | TESTS | 100 | 372 | 1536000 | 2600 | |
| 3857676 | dhh1995 | B | June 11, 2013, 1:41 p.m. | OK | Python 3 | TESTS | 100 | 375 | 5324800 | 2600 | |
| 56017394 | sorry_im_smurfing | B | June 24, 2019, 10:37 p.m. | OK | Python 3 | TESTS | 100 | 466 | 1433600 | 2600 | |
| 42122762 | Mk_Python_v1 | B | Aug. 26, 2018, 1:21 p.m. | OK | Python 3 | TESTS | 100 | 468 | 1331200 | 2600 |
Back to search problems