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.
Problems
B'Alice has an empty grid with n rows and m columns. Some of the cells are marked, and no marked cells are adjacent to the edge of the grid. (Two squares are adjacent if they share a side.) Alice wants to fill each cell with a number such that the following statements are true: The first line of input contains two integers n and m ( 1 <= q n, m <= q 500 ) -- the number of rows and the number of columns in the grid, respectively. Then n lines follow, each containing m characters. Each of these characters is either '. ' or 'X ' -- an unmarked and a marked cell, respectively. No marked cells are adjacent to the edge of the grid. Output " 'NO" if no suitable grid exists. Otherwise, output " 'YES" '. Then output n lines of m space-separated integers -- the integers in the grid. It can be shown that no such grid exists for the second test. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
128011365 |
walk_alone |
F |
Sept. 6, 2021, 4:34 a.m. |
OK |
GNU C++14 |
TESTS |
34 |
46 |
5017600 |
|
|
127984732 |
tuananh_rh |
F |
Sept. 5, 2021, 5:27 p.m. |
OK |
GNU C++14 |
TESTS |
34 |
46 |
158310400 |
|
|
127988267 |
stefdasca |
F |
Sept. 5, 2021, 6:07 p.m. |
OK |
GNU C++14 |
TESTS |
34 |
61 |
13619200 |
|
|
128009086 |
Capitalist_Wang |
F |
Sept. 6, 2021, 3:45 a.m. |
OK |
GNU C++14 |
TESTS |
34 |
62 |
12697600 |
|
|
127980938 |
TearsFreeze |
F |
Sept. 5, 2021, 4:32 p.m. |
OK |
GNU C++14 |
TESTS |
34 |
62 |
15052800 |
|
|
128009163 |
Social_Zhao |
F |
Sept. 6, 2021, 3:46 a.m. |
OK |
GNU C++14 |
TESTS |
34 |
62 |
18124800 |
|
|
127981915 |
superguymj |
F |
Sept. 5, 2021, 4:34 p.m. |
OK |
GNU C++14 |
TESTS |
34 |
62 |
27443200 |
|
|
128004211 |
xiaoziyao |
F |
Sept. 6, 2021, 1:41 a.m. |
OK |
GNU C++14 |
TESTS |
34 |
93 |
5222400 |
|
|
128004209 |
xiaoziyao |
F |
Sept. 6, 2021, 1:41 a.m. |
OK |
GNU C++14 |
TESTS |
34 |
93 |
5222400 |
|
|
128005355 |
MicroMaker |
F |
Sept. 6, 2021, 2:11 a.m. |
OK |
GNU C++14 |
TESTS |
34 |
93 |
14233600 |
|
|
128003870 |
niyuzheNO1 |
F |
Sept. 6, 2021, 1:32 a.m. |
OK |
GNU C++17 |
TESTS |
34 |
31 |
7168000 |
|
|
128016332 |
VC1Z |
F |
Sept. 6, 2021, 6:03 a.m. |
OK |
GNU C++17 |
TESTS |
34 |
46 |
7168000 |
|
|
128013348 |
VC1Z |
F |
Sept. 6, 2021, 5:13 a.m. |
OK |
GNU C++17 |
TESTS |
34 |
46 |
7168000 |
|
|
127993989 |
spy20051623 |
F |
Sept. 5, 2021, 7:50 p.m. |
OK |
GNU C++17 |
TESTS |
34 |
46 |
13926400 |
|
|
128006110 |
hefan |
F |
Sept. 6, 2021, 2:31 a.m. |
OK |
GNU C++17 |
TESTS |
34 |
61 |
23756800 |
|
|
128001863 |
AlexanderL |
F |
Sept. 6, 2021, 12:25 a.m. |
OK |
GNU C++17 |
TESTS |
34 |
62 |
6348800 |
|
|
127986433 |
thanhchauns2 |
F |
Sept. 5, 2021, 5:43 p.m. |
OK |
GNU C++17 |
TESTS |
34 |
62 |
10649600 |
|
|
128013177 |
Usefully_XunYu |
F |
Sept. 6, 2021, 5:10 a.m. |
OK |
GNU C++17 |
TESTS |
34 |
62 |
25292800 |
|
|
127979543 |
maspy |
F |
Sept. 5, 2021, 4:28 p.m. |
OK |
GNU C++17 |
TESTS |
34 |
77 |
14438400 |
|
|
128002779 |
kongweisa |
F |
Sept. 6, 2021, 12:58 a.m. |
OK |
GNU C++17 |
TESTS |
34 |
78 |
5017600 |
|
|
128000406 |
HollwoQ_Pelw |
F |
Sept. 5, 2021, 11:30 p.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
46 |
5734400 |
|
|
128016362 |
AutumnKite |
F |
Sept. 6, 2021, 6:03 a.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
46 |
5836800 |
|
|
128011044 |
chctxdy68 |
F |
Sept. 6, 2021, 4:27 a.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
46 |
6656000 |
|
|
127981282 |
DreamingLeaf |
F |
Sept. 5, 2021, 4:32 p.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
46 |
24678400 |
|
|
128008941 |
froggyzhang |
F |
Sept. 6, 2021, 3:42 a.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
61 |
5632000 |
|
|
128003888 |
stoorz |
F |
Sept. 6, 2021, 1:33 a.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
62 |
27443200 |
|
|
128003811 |
stoorz |
F |
Sept. 6, 2021, 1:30 a.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
62 |
27443200 |
|
|
127978516 |
Eqkora |
F |
Sept. 5, 2021, 4:24 p.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
62 |
38604800 |
|
|
128001266 |
sam571128 |
F |
Sept. 6, 2021, 12:05 a.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
62 |
50585600 |
|
|
128006827 |
913887524gsd |
F |
Sept. 6, 2021, 2:50 a.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
62 |
66764800 |
|
|
127987537 |
clyring |
F |
Sept. 5, 2021, 5:57 p.m. |
OK |
Haskell |
TESTS |
34 |
280 |
40038400 |
|
|
127981592 |
SecondThread |
F |
Sept. 5, 2021, 4:33 p.m. |
OK |
Java 8 |
TESTS |
34 |
1029 |
26009600 |
|
|
127978656 |
machine_solution |
F |
Sept. 5, 2021, 4:25 p.m. |
OK |
MS C++ 2017 |
TESTS |
34 |
202 |
8192000 |
|
|
128015263 |
henrychenOutlook |
F |
Sept. 6, 2021, 5:46 a.m. |
OK |
Node.js |
TESTS |
34 |
343 |
51609600 |
|
|
127976918 |
huikang |
F |
Sept. 5, 2021, 4:19 p.m. |
OK |
PyPy 3 |
TESTS |
34 |
1044 |
103628800 |
|
|
remove filters
Back to search problems