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 | 465145185 | July 22, 2011, 3 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 200 ) | D | Help Monks | PROGRAMMING | constructive algorithms | 2400 |
In a far away kingdom is the famous Lio Shan monastery. Gods constructed three diamond pillars on the monastery's lawn long ago. Gods also placed on one pillar n golden disks of different diameters (in the order of the diameters' decreasing from the bottom to the top). Besides, gods commanded to carry all the disks from the first pillar to the third one according to the following rules: you can carry only one disk in one move; you cannot put a larger disk on a smaller one. However, the monastery wasn't doing so well lately and the wise prior Ku Sean Sun had to cut some disks at the edges and use the gold for the greater good. Wouldn't you think that the prior is entitled to have an air conditioning system? Besides, staying in the monastery all year is sooo dull… One has to have a go at something new now and then, go skiing, for example… Ku Sean Sun realize how big a mistake he had made only after a while: after he cut the edges, the diameters of some disks got the same; that means that some moves that used to be impossible to make, were at last possible (why, gods never prohibited to put a disk on a disk of the same diameter). Thus, the possible Armageddon can come earlier than was initially planned by gods. Much earlier. So much earlier, in fact, that Ku Sean Sun won't even have time to ski all he wants or relax under the air conditioner. The wise prior could never let that last thing happen and he asked one very old and very wise witch PikiWedia to help him. May be she can determine the least number of moves needed to solve the gods' problem. However, the witch laid out her cards and found no answer for the prior. Then he asked you to help him. Can you find the shortest solution of the problem, given the number of disks and their diameters? Keep in mind that it is allowed to place disks of the same diameter one on the other one, however, the order in which the disks are positioned on the third pillar in the end should match the initial order of the disks |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1014492 | waterkid | D | Jan. 6, 2012, 8:41 a.m. | OK | FPC | TESTS | 102 | 140 | 1024000 | 2400 | |
| 2762237 | luogan | D | Dec. 14, 2012, 2:49 a.m. | OK | FPC | TESTS | 102 | 140 | 8806400 | 2400 | |
| 712537 | giongto35 | D | Sept. 22, 2011, 6:23 p.m. | OK | FPC | TESTS | 102 | 170 | 9420800 | 2400 | |
| 2909870 | master_miu | D | Jan. 13, 2013, 1:47 a.m. | OK | GNU C++ | TESTS | 102 | 93 | 5017600 | 2400 | |
| 2750073 | lydrainbowcat | D | Dec. 11, 2012, 7:59 a.m. | OK | GNU C++ | TESTS | 102 | 218 | 12595200 | 2400 | |
| 2750172 | asklzxn2 | D | Dec. 11, 2012, 8:21 a.m. | OK | GNU C++ | TESTS | 102 | 234 | 8396800 | 2400 | |
| 560437 | Gluk | D | July 22, 2011, 4:58 p.m. | OK | GNU C++ | TESTS | 102 | 250 | 14028800 | 2400 | |
| 1999017 | LGM | D | Aug. 11, 2012, 5:37 a.m. | OK | GNU C++ | TESTS | 102 | 250 | 14131200 | 2400 | |
| 2555612 | tangpeiwen | D | Nov. 14, 2012, 7:20 a.m. | OK | GNU C++ | TESTS | 102 | 265 | 0 | 2400 | |
| 2421429 | weixinding | D | Oct. 24, 2012, 12:36 p.m. | OK | GNU C++ | TESTS | 102 | 265 | 0 | 2400 | |
| 2554815 | moreD | D | Nov. 14, 2012, 12:33 a.m. | OK | GNU C++ | TESTS | 102 | 265 | 8396800 | 2400 | |
| 559046 | peter50216 | D | July 22, 2011, 4:21 p.m. | OK | GNU C++ | TESTS | 102 | 270 | 9830400 | 2400 | |
| 1999034 | LGM | D | Aug. 11, 2012, 5:43 a.m. | OK | GNU C++ | TESTS | 102 | 270 | 14131200 | 2400 | |
| 1047444 | ztk | D | Jan. 15, 2012, 10:28 p.m. | OK | GNU C++0x | TESTS | 102 | 270 | 18227200 | 2400 | |
| 558952 | watashi | D | July 22, 2011, 4:18 p.m. | OK | GNU C++0x | TESTS | 102 | 280 | 14028800 | 2400 | |
| 2675552 | apia | D | Nov. 29, 2012, 5:54 a.m. | OK | GNU C++0x | TESTS | 102 | 296 | 0 | 2400 | |
| 2746331 | llj_bash | D | Dec. 10, 2012, 8:36 a.m. | OK | GNU C++0x | TESTS | 102 | 296 | 12697600 | 2400 | |
| 2832734 | CMHJT | D | Dec. 27, 2012, 11:38 a.m. | OK | GNU C++0x | TESTS | 102 | 312 | 13209600 | 2400 | |
| 2799296 | bakabakashyoshyo | D | Dec. 20, 2012, 4:09 p.m. | OK | GNU C++0x | TESTS | 102 | 328 | 8396800 | 2400 | |
| 2805232 | dc. | D | Dec. 22, 2012, 3:22 a.m. | OK | GNU C++0x | TESTS | 102 | 328 | 13209600 | 2400 | |
| 5969126 | FancyCoder | D | March 9, 2014, 1:20 p.m. | OK | GNU C++0x | TESTS | 102 | 404 | 0 | 2400 | |
| 1997848 | mruxim | D | Aug. 10, 2012, 1:18 p.m. | OK | GNU C++0x | TESTS | 102 | 630 | 14131200 | 2400 | |
| 5030570 | FarbodY | D | Nov. 8, 2013, 3:12 p.m. | OK | GNU C++0x | TESTS | 102 | 966 | 13209600 | 2400 | |
| 57904717 | lopare | D | July 28, 2019, 5:08 p.m. | OK | GNU C++11 | TESTS | 102 | 342 | 16691200 | 2400 | |
| 27707364 | 423555290 | D | June 10, 2017, 1:47 p.m. | OK | GNU C++11 | TESTS | 102 | 404 | 0 | 2400 | |
| 16829926 | freebsdx | D | March 20, 2016, 2:07 a.m. | OK | GNU C++11 | TESTS | 102 | 404 | 2048000 | 2400 | |
| 24903443 | WeHaveInt | D | Feb. 22, 2017, 11:18 p.m. | OK | GNU C++11 | TESTS | 102 | 1934 | 15462400 | 2400 | |
| 47366959 | ASSWECAN | D | Dec. 22, 2018, 12:02 p.m. | OK | GNU C++14 | TESTS | 102 | 248 | 16076800 | 2400 | |
| 21328935 | DesHxr | D | Oct. 10, 2016, 1:35 a.m. | OK | GNU C++14 | TESTS | 102 | 278 | 1945600 | 2400 | |
| 56017407 | sorry_im_smurfing | D | June 24, 2019, 10:38 p.m. | OK | GNU C++14 | TESTS | 102 | 278 | 16793600 | 2400 | |
| 41005604 | ReaLNero1 | D | July 31, 2018, 9:29 a.m. | OK | GNU C++14 | TESTS | 102 | 280 | 0 | 2400 | |
| 23563286 | Ali.Pi | D | Jan. 5, 2017, 9:31 p.m. | OK | GNU C++14 | TESTS | 102 | 312 | 12902400 | 2400 | |
| 41954069 | boook | D | Aug. 22, 2018, 5:01 a.m. | OK | GNU C++14 | TESTS | 102 | 372 | 12697600 | 2400 | |
| 67271523 | ElangBondol | D | Dec. 20, 2019, 8:30 a.m. | OK | GNU C++14 | TESTS | 102 | 374 | 8601600 | 2400 | |
| 38787936 | Cmise | D | May 31, 2018, 2:07 a.m. | OK | GNU C++14 | TESTS | 102 | 404 | 3379200 | 2400 | |
| 62956043 | artur.socha | D | Oct. 19, 2019, 8:32 p.m. | OK | GNU C++14 | TESTS | 102 | 468 | 12800000 | 2400 | |
| 57725041 | upobir | D | July 25, 2019, 6:52 a.m. | OK | GNU C++14 | TESTS | 102 | 560 | 12697600 | 2400 | |
| 40303384 | ruo | D | July 14, 2018, 3:57 a.m. | OK | GNU C++17 | TESTS | 102 | 248 | 0 | 2400 | |
| 54710671 | ZhemeDuoXiju | D | May 27, 2019, 10:01 a.m. | OK | GNU C++17 | TESTS | 102 | 434 | 25395200 | 2400 | |
| 876796 | partizan22 | D | Nov. 18, 2011, 4:21 a.m. | OK | Java 6 | TESTS | 102 | 170 | 43212800 | 2400 | |
| 560881 | ivan.metelsky | D | July 22, 2011, 6:39 p.m. | OK | Java 6 | TESTS | 102 | 330 | 71168000 | 2400 | |
| 559982 | Imba | D | July 22, 2011, 4:48 p.m. | OK | Java 6 | TESTS | 102 | 380 | 43212800 | 2400 | |
| 561360 | Narg | D | July 23, 2011, 12:19 a.m. | OK | Java 6 | TESTS | 102 | 560 | 83660800 | 2400 | |
| 561359 | Narg | D | July 23, 2011, 12:18 a.m. | OK | Java 6 | TESTS | 102 | 690 | 83660800 | 2400 | |
| 559820 | Narg | D | July 22, 2011, 4:44 p.m. | OK | Java 6 | TESTS | 102 | 720 | 83558400 | 2400 | |
| 564096 | segrey | D | July 24, 2011, 5:56 p.m. | OK | Java 6 | TESTS | 102 | 830 | 70758400 | 2400 | |
| 561363 | Narg | D | July 23, 2011, 12:24 a.m. | OK | Java 6 | TESTS | 102 | 880 | 48332800 | 2400 | |
| 556568 | Petr | D | July 22, 2011, 3:23 p.m. | OK | Java 6 | TESTS | 102 | 940 | 117760000 | 2400 | |
| 930149 | Marloc | D | Dec. 4, 2011, 7:21 p.m. | OK | Java 6 | TESTS | 102 | 1000 | 126464000 | 2400 | |
| 2754229 | qiandichen | D | Dec. 12, 2012, 11:20 a.m. | OK | Java 7 | TESTS | 102 | 734 | 30208000 | 2400 | |
| 17702410 | mkirsche | D | May 3, 2016, 7:59 p.m. | OK | Java 7 | TESTS | 102 | 746 | 50483200 | 2400 | |
| 11533020 | AStepanov | D | June 11, 2015, 12:33 p.m. | OK | Java 8 | TESTS | 102 | 778 | 39731200 | 2400 | |
| 562930 | Slevin | D | July 23, 2011, 4:03 p.m. | OK | MS C++ | TESTS | 102 | 330 | 5632000 | 2400 | |
| 561531 | Kenny_HORROR | D | July 23, 2011, 2:14 a.m. | OK | MS C++ | TESTS | 102 | 380 | 15462400 | 2400 | |
| 560171 | Shef | D | July 22, 2011, 4:52 p.m. | OK | MS C++ | TESTS | 102 | 380 | 15462400 | 2400 | |
| 558160 | AleX | D | July 22, 2011, 3:55 p.m. | OK | MS C++ | TESTS | 102 | 380 | 15462400 | 2400 | |
| 559593 | nevidomy | D | July 22, 2011, 4:38 p.m. | OK | MS C++ | TESTS | 102 | 380 | 16486400 | 2400 | |
| 575797 | acrux | D | Aug. 2, 2011, 6:39 a.m. | OK | MS C++ | TESTS | 102 | 390 | 9830400 | 2400 | |
| 576004 | sleepiforest | D | Aug. 2, 2011, 11:50 a.m. | OK | MS C++ | TESTS | 102 | 390 | 15462400 | 2400 |
Back to search problems