結果
| 問題 |
No.202 1円玉投げ
|
| コンテスト | |
| ユーザー |
yaoshimax
|
| 提出日時 | 2015-05-22 00:31:56 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 350 ms / 5,000 ms |
| コード長 | 446 bytes |
| コンパイル時間 | 802 ms |
| コンパイル使用メモリ | 76,984 KB |
| 実行使用メモリ | 95,696 KB |
| 最終ジャッジ日時 | 2024-12-22 09:22:36 |
| 合計ジャッジ時間 | 10,366 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 |
ソースコード
N=int(raw_input())
segs=[[[] for i in range(510)] for j in range(510)]
ans=0
for i in range(N):
x,y=map(int,raw_input().split())
xi,yj=(x/40)+1,(y/40+1)
ok=True
for dx in (-1,0,1):
for dy in (-1,0,1):
for (p,q) in segs[xi+dx][yj+dy]:
if (p-x)*(p-x)+(q-y)*(q-y)<400:
ok=False
break
if ok:
ans+=1
segs[xi][yj].append((x,y))
print ans
yaoshimax