| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1328777 | model_code | Minesweeper (COCI25_minesweeper) | Pypy 3 | 258 ms | 54044 KiB |
n, m, k = map(int, input().split())
px = [-1, -1, 0, 1, 1, 1, 0, -1]
py = [0, 1, 1, 1, 0, -1, -1, -1]
mat = []
for i in range(n):
mat.append([0] * m)
for i in range(k):
x, y = map(int, input().split())
x -= 1
y -= 1
mat[x][y] = -1
for j in range(8):
nx = x + px[j]
ny = y + py[j]
if (nx >= 0 and ny >= 0 and nx < n and ny < m):
if (mat[nx][ny] != -1):
mat[nx][ny] += 1
for i in range(n):
for j in range(m):
if (mat[i][j] == -1):
print("B", end = " ")
else:
print(mat[i][j], end = " ")
print()
컴파일 시 표준 출력 (stdout) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
