結果
| 問題 |
No.202 1円玉投げ
|
| コンテスト | |
| ユーザー |
ayaoni
|
| 提出日時 | 2021-08-30 21:56:00 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,093 bytes |
| コンパイル時間 | 310 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 107,112 KB |
| 最終ジャッジ日時 | 2024-12-22 12:09:53 |
| 合計ジャッジ時間 | 7,338 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 RE * 25 |
ソースコード
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())
N = I()
area = [[[] for _ in range(800)] for _ in range(800)]
XY = []
R = [-1,0,1]
ans = 0
for k in range(N):
x,y = MI()
XY.append((x,y))
i = x//25
j = y//25
is_eliminated = 0
for di in R:
ni = i+di
if not (0 <= ni < 800):
continue
for dj in R:
nj = j+dj
if not (0 <= nj < 800):
continue
for l in area[ni][nj]:
xl,yl = XY[l]
if (x-xl)**2+(y-yl)**2 < 400:
is_eliminated = 1
break
if is_eliminated:
continue
else:
area[i][j].append(k)
ans += 1
print(ans)
ayaoni