結果
問題 | No.202 1円玉投げ |
ユーザー |
![]() |
提出日時 | 2025-05-12 20:04:06 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 653 bytes |
コンパイル時間 | 560 ms |
コンパイル使用メモリ | 82,520 KB |
実行使用メモリ | 451,408 KB |
最終ジャッジ日時 | 2025-05-12 20:04:43 |
合計ジャッジ時間 | 35,794 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 WA * 22 |
ソースコード
placed = set() X0 = [(0, 9), (1, 9), (2, 9), (3, 9), (4, 9), (4, 8), (5, 8), (5, 7), (6, 7), (7, 7), (7, 6), (7, 5), (8, 5), (8, 4), (9, 1), (9, 2), (9, 3), (9, 4)] X1 = X0[:] for x, y in X0: X1.append((-x, y)) X1.append((x, -y)) X1.append((-x, -y)) W = 20050 placed = set() ans = 0 for _ in range(int(input())): x, y = map(int, input().split()) x += 10 y += 10 f = False for dx, dy in X1: if (x + dx) * W + y + dy in placed: f = True break if f: break else: ans += 1 for dx, dy in X1: placed.add((x + dx) * W + y + dy) print(ans)