結果
| 問題 | 
                            No.202 1円玉投げ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             ntuda
                         | 
                    
| 提出日時 | 2025-05-12 20:10:07 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 3,164 ms / 5,000 ms | 
| コード長 | 491 bytes | 
| コンパイル時間 | 533 ms | 
| コンパイル使用メモリ | 82,732 KB | 
| 実行使用メモリ | 87,880 KB | 
| 最終ジャッジ日時 | 2025-05-12 20:11:03 | 
| 合計ジャッジ時間 | 54,900 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 38 | 
ソースコード
placed = set()
X = [19, 19, 19, 19, 19, 19, 19, 18, 18, 17, 17, 16, 15, 15, 14, 13, 11, 10, 8, 6]
W = 20100
for _ in range(int(input())):
    x, y = map(int, input().split())
    x += 20
    y += 20
    f = False
    for dx in range(-19, 20):
        i = abs(dx)
        for dy in range(-X[i], X[i] + 1):
            if (x + dx) * W + y + dy in placed:
                f = True
                break
        if f:
            break
    else:
        placed.add(x * W + y)
print(len(placed))
            
            
            
        
            
ntuda