結果

問題 No.2843 Birthday Present Struggle
ユーザー ryusuke
提出日時 2024-08-23 21:35:40
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 448 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 82,276 KB
実行使用メモリ 54,208 KB
最終ジャッジ日時 2024-08-23 21:35:46
合計ジャッジ時間 6,455 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 1 WA * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

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((ny, nx))
print(len(ans))
for i, j in ans:
    print(i, j)
0