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 |
|---|---|---|---|---|---|---|
| 126 | Codeforces Beta Round 93 (Div. 1 Only) | FINISHED | False | 7200 | 455547623 | Nov. 9, 2011, 5 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 98 ) | E | Pills | PROGRAMMING | brute force flows | 3100 |
Doctor prescribed medicine to his patient. The medicine is represented by pills. Each pill consists of a shell and healing powder. The shell consists of two halves; each half has one of four colors — blue, red, white or yellow. The doctor wants to put 28 pills in a rectangular box 7 × 8 in size. Besides, each pill occupies exactly two neighboring cells and any cell contains exactly one half of a pill. Thus, the result is a four colored picture 7 × 8 in size. The doctor thinks that a patient will recover sooner if the picture made by the pills will be special. Unfortunately, putting the pills in the box so as to get the required picture is not a very easy task. That's why doctor asks you to help. Doctor has some amount of pills of each of 10 painting types. They all contain the same medicine, that's why it doesn't matter which 28 of them will be stored inside the box. Place the pills in the box so that the required picture was formed. If it is impossible to place the pills in the required manner, then place them so that the number of matching colors in all 56 cells in the final arrangement and the doctor's picture were maximum. First 7 lines contain the doctor's picture. Each line contains 8 characters, each character can be " B ", " R ", " W " and " Y " that stands for blue, red, white and yellow colors correspondingly. Next four lines contain 10 numbers that stand for, correspondingly, the number of pills painted: " BY " " BW " " BR " " BB " " RY " " RW " " RR " " WY " " WW " " YY " Those numbers lie within range from 0 to 28 inclusively. It is guaranteed that the total number of pills in no less than 28 . Print on the first line the maximal number cells for which the colors match. Then print 13 lines each containing 15 characters — the pills' position in the optimal arrangement. The intersections of odd lines and odd columns should contain characters " B ", " R ", " W " and " Y ". All other positions should contain characters " . ", " - " and " | ". Use |
| Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 934030 | zanoes | E | Dec. 7, 2011, 8:14 a.m. | OK | Delphi | TESTS | 44 | 2940 | 819200 | 3100 | |
| 932640 | coolinging | E | Dec. 6, 2011, 8:02 a.m. | OK | FPC | TESTS | 44 | 1700 | 11059200 | 3100 | |
| 6723469 | VoolDD5 | E | May 27, 2014, 7:48 p.m. | OK | FPC | TESTS | 44 | 2496 | 0 | 3100 | |
| 1639046 | blackapple | E | April 28, 2012, 3:05 p.m. | OK | FPC | TESTS | 44 | 2940 | 26726400 | 3100 | |
| 35838161 | ______n______ | E | March 2, 2018, 1:27 p.m. | OK | GNU C++ | TESTS | 44 | 342 | 3891200 | 3100 | |
| 35838155 | ______u______ | E | March 2, 2018, 1:27 p.m. | OK | GNU C++ | TESTS | 44 | 342 | 3891200 | 3100 | |
| 35838107 | _____i_____ | E | March 2, 2018, 1:27 p.m. | OK | GNU C++ | TESTS | 44 | 342 | 3891200 | 3100 | |
| 35838087 | _____k_____ | E | March 2, 2018, 1:26 p.m. | OK | GNU C++ | TESTS | 44 | 342 | 3891200 | 3100 | |
| 35831629 | ______h______ | E | March 2, 2018, 9:52 a.m. | OK | GNU C++ | TESTS | 44 | 342 | 3891200 | 3100 | |
| 35831592 | ______k______ | E | March 2, 2018, 9:51 a.m. | OK | GNU C++ | TESTS | 44 | 342 | 3891200 | 3100 | |
| 35831571 | ______i______ | E | March 2, 2018, 9:51 a.m. | OK | GNU C++ | TESTS | 44 | 342 | 3891200 | 3100 | |
| 35830157 | ______M______ | E | March 2, 2018, 9:05 a.m. | OK | GNU C++ | TESTS | 44 | 342 | 3891200 | 3100 | |
| 40992149 | ReaLNero1 | E | July 31, 2018, 1:07 a.m. | OK | GNU C++ | TESTS | 44 | 374 | 1843200 | 3100 | |
| 854113 | sevenkplus | E | Nov. 10, 2011, 2:55 a.m. | OK | GNU C++ | TESTS | 44 | 480 | 2048000 | 3100 | |
| 852642 | 2222 | E | Nov. 9, 2011, 8:14 p.m. | OK | GNU C++0x | TESTS | 44 | 1860 | 1433600 | 3100 | |
| 852463 | 2222 | E | Nov. 9, 2011, 8:09 p.m. | OK | GNU C++0x | TESTS | 44 | 2080 | 1433600 | 3100 | |
| 67274903 | ElangBondol | E | Dec. 20, 2019, 9:49 a.m. | OK | GNU C++11 | TESTS | 44 | 327 | 1843200 | 3100 | |
| 57903572 | lopare | E | July 28, 2019, 4:41 p.m. | OK | GNU C++11 | TESTS | 44 | 327 | 1843200 | 3100 | |
| 40568014 | vjudge3 | E | July 20, 2018, 6:37 a.m. | OK | GNU C++11 | TESTS | 44 | 342 | 1843200 | 3100 | |
| 37586799 | vjudge2 | E | April 25, 2018, 3:05 a.m. | OK | GNU C++11 | TESTS | 44 | 343 | 5324800 | 3100 | |
| 14504236 | Los_Angelos_Laycurse | E | Nov. 27, 2015, 3:30 a.m. | OK | GNU C++11 | TESTS | 44 | 421 | 4812800 | 3100 | |
| 21632579 | MohanLau | E | Oct. 21, 2016, 4:20 a.m. | OK | GNU C++11 | TESTS | 44 | 717 | 5734400 | 3100 | |
| 16830219 | freebsdx | E | March 20, 2016, 2:56 a.m. | OK | GNU C++11 | TESTS | 44 | 780 | 2048000 | 3100 | |
| 54497421 | WOSHIGEPACHONG2 | E | May 22, 2019, 6:34 p.m. | OK | GNU C++11 | TESTS | 44 | 1092 | 1945600 | 3100 | |
| 52676225 | vjudge4 | E | April 13, 2019, 9:44 a.m. | OK | GNU C++11 | TESTS | 44 | 1107 | 1945600 | 3100 | |
| 56018100 | sorry_im_smurfing | E | June 24, 2019, 11:34 p.m. | OK | GNU C++14 | TESTS | 44 | 342 | 2048000 | 3100 | |
| 23670853 | Ali.Pi | E | Jan. 9, 2017, 8:41 p.m. | OK | GNU C++14 | TESTS | 44 | 764 | 1945600 | 3100 | |
| 22706138 | RaeTop | E | Dec. 5, 2016, 7 a.m. | OK | GNU C++14 | TESTS | 44 | 779 | 0 | 3100 | |
| 68122876 | artur.socha | E | Jan. 3, 2020, 2 p.m. | OK | GNU C++14 | TESTS | 44 | 1294 | 921600 | 3100 | |
| 890863 | uwi | E | Nov. 25, 2011, 10:27 a.m. | OK | Java 6 | TESTS | 44 | 2910 | 36147200 | 3100 | |
| 14494779 | Los_Angelos_Laycurse | E | Nov. 26, 2015, 3:08 p.m. | OK | MS C++ | TESTS | 44 | 529 | 4812800 | 3100 | |
| 14494728 | Los_Angelos_Laycurse | E | Nov. 26, 2015, 3:04 p.m. | OK | MS C++ | TESTS | 44 | 546 | 1126400 | 3100 | |
| 14494708 | Los_Angelos_Laycurse | E | Nov. 26, 2015, 3:03 p.m. | OK | MS C++ | TESTS | 44 | 561 | 1126400 | 3100 | |
| 852678 | 2222 | E | Nov. 9, 2011, 8:15 p.m. | OK | MS C++ | TESTS | 44 | 2060 | 1433600 | 3100 |
Back to search problems