結果
| 問題 | No.2843 Birthday Present Struggle |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-23 21:38:47 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 65 ms / 2,000 ms |
| + 74µs | |
| コード長 | 448 bytes |
| 記録 | |
| コンパイル時間 | 276 ms |
| コンパイル使用メモリ | 96,184 KB |
| 実行使用メモリ | 79,104 KB |
| 最終ジャッジ日時 | 2026-08-25 03:55:00 |
| 合計ジャッジ時間 | 4,782 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)