結果
| 問題 |
No.202 1円玉投げ
|
| コンテスト | |
| ユーザー |
noko2250
|
| 提出日時 | 2015-06-06 20:59:48 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 772 bytes |
| コンパイル時間 | 375 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-22 09:23:30 |
| 合計ジャッジ時間 | 2,621 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 38 |
ソースコード
import math
def main():
def check(x, y):
for dy in range(-1, 2):
for dx in range(-1, 2):
bx, by = x // size + dx, y // size + dy
if 0 <= bx < 20000 // size + 1 and 0 <= by < 20000 //size + 1:
for cx, cy in L[bx][by]:
if (x-cx)**2 + (y-cy)**2 < 400:
return False;
return True;
n = int(input())
size = math.sqrt(20000)
L = [[[] for i in range(20000 // size + 1)] for j in range(20000 // size + 1)]
ans = 0
for i in range(n):
x, y = map(int, input().split())
if check(x, y):
ans += 1
L[x//size][y//size].append((x, y))
print(ans)
if __name__ == '__main__':
main()
noko2250