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 |
|---|---|---|---|---|---|---|
| 715 | Codeforces Round 372 (Div. 1) | FINISHED | False | 7200 | 302372085 | Sept. 17, 2016, 1:45 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 387 ) | D | Create a Maze | PROGRAMMING | constructive algorithms | 3000 |
ZS the Coder loves mazes. Your job is to create one so that he can play with it. A maze consists of n × m rooms, and the rooms are arranged in n rows (numbered from the top to the bottom starting from 1 ) and m columns (numbered from the left to the right starting from 1 ). The room in the i -th row and j -th column is denoted by ( i , j ) . A player starts in the room (1, 1) and wants to reach the room ( n , m ) . Each room has four doors (except for ones at the maze border), one on each of its walls, and two adjacent by the wall rooms shares the same door. Some of the doors are locked, which means it is impossible to pass through the door. For example, if the door connecting ( i , j ) and ( i , j + 1) is locked, then we can't go from ( i , j ) to ( i , j + 1) . Also, one can only travel between the rooms downwards (from the room ( i , j ) to the room ( i + 1, j ) ) or rightwards (from the room ( i , j ) to the room ( i , j + 1) ) provided the corresponding door is not locked. ZS the Coder considers a maze to have difficulty x if there is exactly x ways of travelling from the room (1, 1) to the room ( n , m ) . Two ways are considered different if they differ by the sequence of rooms visited while travelling. Your task is to create a maze such that its difficulty is exactly equal to T . In addition, ZS the Coder doesn't like large mazes, so the size of the maze and the number of locked doors are limited. Sounds simple enough, right? The first and only line of the input contains a single integer T ( 1 ≤ T ≤ 10 18 ), the difficulty of the required maze. The first line should contain two integers n and m ( 1 ≤ n , m ≤ 50 ) — the number of rows and columns of the maze respectively. The next line should contain a single integer k ( 0 ≤ k ≤ 300 ) — the number of locked doors in the maze. Then, k lines describing locked doors should follow. Each of them should contain four integers, x 1 , y 1 , x 2 , y 2 . This means that the door connecting room ( x 1 , y 1 ) a |
| Codeforces Round #372 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 21771245 | aufeas | D | Oct. 25, 2016, 12:53 p.m. | OK | GNU C++ | TESTS | 164 | 15 | 0 | 3000 | |
| 20811547 | zhanglexing | D | Sept. 22, 2016, 7:07 a.m. | OK | GNU C++ | TESTS | 164 | 15 | 0 | 3000 | |
| 20756681 | Totoro | D | Sept. 19, 2016, 1:36 p.m. | OK | GNU C++ | TESTS | 164 | 15 | 0 | 3000 | |
| 20736515 | zscoder | D | Sept. 18, 2016, 1:51 p.m. | OK | GNU C++ | TESTS | 164 | 15 | 0 | 3000 | |
| 20725204 | liujunhao | D | Sept. 18, 2016, 5:16 a.m. | OK | GNU C++ | TESTS | 164 | 15 | 0 | 3000 | |
| 26445588 | jiyutian | D | April 17, 2017, 4:44 a.m. | OK | GNU C++ | TESTS | 164 | 15 | 1945600 | 3000 | |
| 25862632 | FHW_SO_WALL | D | March 28, 2017, 12:49 a.m. | OK | GNU C++ | TESTS | 164 | 15 | 1945600 | 3000 | |
| 23393345 | wtd2 | D | Dec. 29, 2016, 8:51 a.m. | OK | GNU C++ | TESTS | 164 | 15 | 2150400 | 3000 | |
| 20899721 | AkaneSasu | D | Sept. 25, 2016, 2:42 a.m. | OK | GNU C++ | TESTS | 164 | 30 | 0 | 3000 | |
| 20733927 | WuHongxun | D | Sept. 18, 2016, 12:24 p.m. | OK | GNU C++ | TESTS | 164 | 30 | 0 | 3000 | |
| 21850363 | krijgertje | D | Oct. 28, 2016, 2:56 p.m. | OK | GNU C++11 | TESTS | 164 | 15 | 0 | 3000 | |
| 21731691 | otrecnoc | D | Oct. 24, 2016, 1:40 a.m. | OK | GNU C++11 | TESTS | 164 | 15 | 0 | 3000 | |
| 20793964 | anta | D | Sept. 21, 2016, 12:10 p.m. | OK | GNU C++11 | TESTS | 164 | 15 | 0 | 3000 | |
| 20724492 | eddy1021 | D | Sept. 18, 2016, 4:10 a.m. | OK | GNU C++11 | TESTS | 164 | 15 | 0 | 3000 | |
| 20709863 | jerry | D | Sept. 17, 2016, 3:36 p.m. | OK | GNU C++11 | TESTS | 164 | 15 | 0 | 3000 | |
| 25728062 | liao772002 | D | March 23, 2017, 7:42 a.m. | OK | GNU C++11 | TESTS | 164 | 15 | 2048000 | 3000 | |
| 21187959 | polequoll | D | Oct. 4, 2016, 1:39 p.m. | OK | GNU C++11 | TESTS | 164 | 30 | 0 | 3000 | |
| 20746252 | syc1999 | D | Sept. 19, 2016, 1:43 a.m. | OK | GNU C++11 | TESTS | 164 | 30 | 0 | 3000 | |
| 31841428 | vjudge1 | D | Oct. 28, 2017, 2:40 p.m. | OK | GNU C++11 | TESTS | 164 | 30 | 102400 | 3000 | |
| 20719338 | ffao | D | Sept. 17, 2016, 8:06 p.m. | OK | GNU C++11 | TESTS | 164 | 30 | 102400 | 3000 | |
| 26988586 | fonmagnus | D | May 10, 2017, 1:53 a.m. | OK | GNU C++14 | TESTS | 164 | 15 | 0 | 3000 | |
| 22013151 | AmZ | D | Nov. 3, 2016, 1:16 p.m. | OK | GNU C++14 | TESTS | 164 | 15 | 0 | 3000 | |
| 20958439 | Philipsweng | D | Sept. 28, 2016, 1:15 a.m. | OK | GNU C++14 | TESTS | 164 | 15 | 0 | 3000 | |
| 20868670 | ko_osaga | D | Sept. 23, 2016, 4:57 p.m. | OK | GNU C++14 | TESTS | 164 | 15 | 0 | 3000 | |
| 20817955 | fqw | D | Sept. 22, 2016, 1:21 p.m. | OK | GNU C++14 | TESTS | 164 | 15 | 0 | 3000 | |
| 20765648 | 2016 | D | Sept. 19, 2016, 10:40 p.m. | OK | GNU C++14 | TESTS | 164 | 15 | 0 | 3000 | |
| 20749692 | dzhavaharnal | D | Sept. 19, 2016, 7:54 a.m. | OK | GNU C++14 | TESTS | 164 | 15 | 0 | 3000 | |
| 20704223 | kdh9949 | D | Sept. 17, 2016, 3:05 p.m. | OK | GNU C++14 | TESTS | 164 | 15 | 0 | 3000 | |
| 20700524 | Jacob | D | Sept. 17, 2016, 2:47 p.m. | OK | GNU C++14 | TESTS | 164 | 15 | 0 | 3000 | |
| 22727391 | hdi | D | Dec. 6, 2016, 10:02 a.m. | OK | GNU C++14 | TESTS | 164 | 15 | 102400 | 3000 | |
| 44373103 | majk | D | Oct. 15, 2018, 7:38 p.m. | OK | GNU C++17 | TESTS | 164 | 31 | 0 | 3000 | |
| 69918728 | AlexLuchianov | D | Jan. 31, 2020, 5:43 p.m. | OK | GNU C++17 | TESTS | 164 | 31 | 102400 | 3000 | |
| 57065615 | Benq | D | July 14, 2019, 9:02 p.m. | OK | GNU C++17 | TESTS | 164 | 31 | 204800 | 3000 | |
| 20728256 | LLI_E_P_JI_O_K | D | Sept. 18, 2016, 8:49 a.m. | OK | MS C++ | TESTS | 164 | 187 | 716800 | 3000 | |
| 27175880 | Sereja | D | May 17, 2017, 9:13 a.m. | OK | MS C++ | TESTS | 164 | 280 | 614400 | 3000 | |
| 20986364 | ftiasch | D | Sept. 29, 2016, 8:18 a.m. | OK | PyPy 2 | TESTS | 164 | 124 | 0 | 3000 | |
| 20767530 | sigkill-uw | D | Sept. 20, 2016, 2:58 a.m. | OK | PyPy 2 | TESTS | 164 | 124 | 716800 | 3000 | |
| 20709518 | MiFaFaOvO | D | Sept. 17, 2016, 3:35 p.m. | OK | PyPy 2 | TESTS | 164 | 202 | 614400 | 3000 | |
| 21303921 | Vosatorp | D | Oct. 8, 2016, 7:06 p.m. | OK | PyPy 3 | TESTS | 164 | 187 | 24678400 | 3000 | |
| 20811880 | sd0061 | D | Sept. 22, 2016, 7:33 a.m. | OK | Python 2 | TESTS | 164 | 124 | 0 | 3000 |
Back to search problems