結果
問題 | No.202 1円玉投げ |
ユーザー |
![]() |
提出日時 | 2022-10-13 01:58:20 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 524 ms / 5,000 ms |
コード長 | 519 bytes |
コンパイル時間 | 381 ms |
コンパイル使用メモリ | 82,092 KB |
実行使用メモリ | 80,748 KB |
最終ジャッジ日時 | 2024-06-26 11:39:34 |
合計ジャッジ時間 | 10,120 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
import sys input = sys.stdin.readline N=int(input()) ANS=0 LIST=[[[] for j in range(100)] for i in range(100)] for i in range(N): x,y=map(int,input().split()) k=x//250 l=y//250 flag=1 for s in [k,k-1,k+1]: for t in [l,l-1,l+1]: if 0<=s<100 and 0<=t<100: for z,w in LIST[s][t]: if (x-z)**2+(y-w)**2<400: flag=0 if flag==1: ANS+=1 LIST[k][l].append((x,y)) print(ANS)