結果
| 問題 |
No.2843 Birthday Present Struggle
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-23 21:38:47 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 448 bytes |
| コンパイル時間 | 531 ms |
| コンパイル使用メモリ | 82,260 KB |
| 実行使用メモリ | 53,784 KB |
| 最終ジャッジ日時 | 2024-08-23 21:38:51 |
| 合計ジャッジ時間 | 3,523 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 34 |
ソースコード
N = int(input())
ax, ay = map(int, input().split())
bx, by = map(int, input().split())
cx, cy = map(int, input().split())
ans = []
d = ((1, 0), (-1, 0), (0, 1), (0, -1))
for dy, dx in d:
ny = cy + dy
nx = cx + dx
if not (1 <= ny <= N and 1 <= nx <= N):
continue
if (ny, nx) == (by, bx):
continue
if (ny, nx) == (ay, ax):
continue
ans.append((nx, ny))
print(len(ans))
for i, j in ans:
print(i, j)