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 |
|---|---|---|---|---|---|---|
| 71 | Codeforces Beta Round 65 (Div. 2) | FINISHED | False | 7200 | 474994823 | March 29, 2011, 3 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 766 ) | D | Solitaire | PROGRAMMING | brute force implementation | 2200 |
Vasya has a pack of 54 cards ( 52 standard cards and 2 distinct jokers). That is all he has at the moment. Not to die from boredom, Vasya plays Solitaire with them. Vasya lays out nm cards as a rectangle n × m . If there are jokers among them, then Vasya should change them with some of the rest of 54 - nm cards (which are not layed out) so that there were no jokers left. Vasya can pick the cards to replace the jokers arbitrarily. Remember, that each card presents in pack exactly once (i. e. in a single copy ). Vasya tries to perform the replacements so that the solitaire was solved . Vasya thinks that the solitaire is solved if after the jokers are replaced, there exist two non-overlapping squares 3 × 3 , inside each of which all the cards either have the same suit, or pairwise different ranks. Determine by the initial position whether the solitaire can be solved or not. If it can be solved, show the way in which it is possible. The first line contains integers n and m ( 3 ≤ n , m ≤ 17 , n × m ≤ 52 ). Next n lines contain m words each. Each word consists of two letters. The jokers are defined as " J1 " and " J2 " correspondingly. For the rest of the cards, the first letter stands for the rank and the second one — for the suit. The possible ranks are: " 2 ", " 3 ", " 4 ", " 5 ", " 6 ", " 7 ", " 8 ", " 9 ", " T ", " J ", " Q ", " K " and " A ". The possible suits are: " C ", " D ", " H " and " S ". All the cards are different. If the Solitaire can be solved, print on the first line " Solution exists. " without the quotes. On the second line print in what way the jokers can be replaced. Three variants are possible: " There are no jokers. ", if there are no jokers in the input data. " Replace J x with y . ", if there is one joker. x is its number, and y is the card it should be replaced with. " Replace J1 with x and J2 with y . ", if both jokers are present in the input data. x and y here represent distinct cards with which one should replace the first and the |
| Разбор задач Codeforces Beta Round #65 (Div. 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 60231160 | rainboy | D | Sept. 7, 2019, 4:31 p.m. | OK | GNU C11 | TESTS | 47 | 31 | 0 | 2200 | |
| 64564239 | vjudge3 | D | Nov. 9, 2019, 7:07 a.m. | OK | GNU C++11 | TESTS | 47 | 31 | 0 | 2200 | |
| 54542751 | qiuzx | D | May 24, 2019, 3:38 a.m. | OK | GNU C++11 | TESTS | 47 | 31 | 0 | 2200 | |
| 54541512 | nanatoday | D | May 24, 2019, 2:24 a.m. | OK | GNU C++11 | TESTS | 47 | 31 | 0 | 2200 | |
| 54540617 | nanatoday | D | May 24, 2019, 1:11 a.m. | OK | GNU C++11 | TESTS | 47 | 31 | 0 | 2200 | |
| 54515661 | nanatoday | D | May 23, 2019, 9:42 a.m. | OK | GNU C++11 | TESTS | 47 | 31 | 0 | 2200 | |
| 54505657 | nanatoday | D | May 23, 2019, 3:32 a.m. | OK | GNU C++11 | TESTS | 47 | 31 | 0 | 2200 | |
| 54451917 | rng_78 | D | May 21, 2019, 1:56 p.m. | OK | GNU C++11 | TESTS | 47 | 31 | 0 | 2200 | |
| 54444576 | qinding | D | May 21, 2019, 10:36 a.m. | OK | GNU C++11 | TESTS | 47 | 31 | 0 | 2200 | |
| 64564939 | Davidshx | D | Nov. 9, 2019, 7:23 a.m. | OK | GNU C++11 | TESTS | 47 | 31 | 0 | 2200 | |
| 65434330 | vjudge4 | D | Nov. 20, 2019, 12:57 p.m. | OK | GNU C++11 | TESTS | 47 | 31 | 102400 | 2200 | |
| 65442457 | vjudge1 | D | Nov. 20, 2019, 2:47 p.m. | OK | GNU C++14 | TESTS | 47 | 31 | 204800 | 2200 | |
| 62438306 | J4TR | D | Oct. 12, 2019, 6:18 p.m. | OK | GNU C++14 | TESTS | 47 | 31 | 204800 | 2200 | |
| 58194546 | aapc_image | D | Aug. 2, 2019, 10:24 p.m. | OK | GNU C++14 | TESTS | 47 | 31 | 204800 | 2200 | |
| 56984180 | ishancosmos25 | D | July 13, 2019, 3:11 p.m. | OK | GNU C++14 | TESTS | 47 | 31 | 204800 | 2200 | |
| 69692922 | silxi | D | Jan. 28, 2020, 7:16 p.m. | OK | GNU C++14 | TESTS | 47 | 31 | 204800 | 2200 | |
| 55381773 | sabertooth | D | June 9, 2019, 9:22 p.m. | OK | GNU C++14 | TESTS | 47 | 31 | 204800 | 2200 | |
| 55302703 | MacQuackin | D | June 8, 2019, 12:43 p.m. | OK | GNU C++14 | TESTS | 47 | 31 | 204800 | 2200 | |
| 54503767 | SebaMarin | D | May 23, 2019, 1:30 a.m. | OK | GNU C++14 | TESTS | 47 | 31 | 204800 | 2200 | |
| 56309191 | jpSwing | D | June 30, 2019, 1:47 p.m. | OK | GNU C++14 | TESTS | 47 | 31 | 204800 | 2200 | |
| 65535842 | Muhammad_Hokimiyon | D | Nov. 22, 2019, 2:07 p.m. | OK | GNU C++14 | TESTS | 47 | 31 | 409600 | 2200 | |
| 54450478 | kenimo | D | May 21, 2019, 1:19 p.m. | OK | GNU C++17 | TESTS | 47 | 31 | 0 | 2200 | |
| 61805754 | MercyCame | D | Oct. 3, 2019, 9:24 p.m. | OK | GNU C++17 | TESTS | 47 | 31 | 102400 | 2200 | |
| 61805852 | MercyCame | D | Oct. 3, 2019, 9:28 p.m. | OK | GNU C++17 | TESTS | 47 | 31 | 102400 | 2200 | |
| 64177237 | morete | D | Nov. 3, 2019, 9:42 p.m. | OK | GNU C++17 | TESTS | 47 | 31 | 204800 | 2200 | |
| 59977140 | platypus179 | D | Sept. 4, 2019, 6:30 a.m. | OK | GNU C++17 | TESTS | 47 | 31 | 204800 | 2200 | |
| 55563258 | llbra9z | D | June 14, 2019, 1:52 p.m. | OK | GNU C++17 | TESTS | 47 | 31 | 204800 | 2200 | |
| 55313401 | Arrias | D | June 8, 2019, 7:14 p.m. | OK | GNU C++17 | TESTS | 47 | 31 | 204800 | 2200 | |
| 54525089 | Eric_hooo | D | May 23, 2019, 2:07 p.m. | OK | GNU C++17 | TESTS | 47 | 31 | 204800 | 2200 | |
| 54523704 | Eric_hooo | D | May 23, 2019, 1:27 p.m. | OK | GNU C++17 | TESTS | 47 | 31 | 204800 | 2200 | |
| 64616429 | yet_super_CONFIDENCE | D | Nov. 10, 2019, 5:02 a.m. | OK | GNU C++17 | TESTS | 47 | 31 | 204800 | 2200 | |
| 60231161 | Dukkha | D | Sept. 7, 2019, 4:31 p.m. | OK | Java 8 | TESTS | 47 | 139 | 0 | 2200 | |
| 54961304 | richboy | D | June 2, 2019, 3:55 a.m. | OK | Java 8 | TESTS | 47 | 140 | 0 | 2200 | |
| 53764679 | Ahmed.Shawky | D | May 4, 2019, 9:58 p.m. | OK | Java 8 | TESTS | 47 | 187 | 0 | 2200 | |
| 57091596 | cpets | D | July 15, 2019, 10:57 a.m. | OK | PyPy 3 | TESTS | 47 | 140 | 1536000 | 2200 | |
| 57134244 | fporp | D | July 16, 2019, 8:19 a.m. | OK | PyPy 3 | TESTS | 47 | 202 | 4608000 | 2200 | |
| 52898460 | Mr.Inconsistent | D | April 17, 2019, 10:04 a.m. | OK | PyPy 3 | TESTS | 47 | 295 | 5836800 | 2200 | |
| 57751413 | mhorst | D | July 25, 2019, 2:54 p.m. | OK | Python 3 | TESTS | 47 | 140 | 307200 | 2200 | |
| 59133483 | yltx | D | Aug. 20, 2019, 11:51 a.m. | OK | Python 3 | TESTS | 47 | 155 | 307200 | 2200 | |
| 63550748 | MinecraftFuns | D | Oct. 27, 2019, 11:37 a.m. | OK | Python 3 | TESTS | 47 | 171 | 307200 | 2200 |
Back to search problems