結果

問題 No.1265 Balloon Survival
ユーザー taiga000629taiga000629
提出日時 2020-10-23 22:17:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 380 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 86,856 KB
実行使用メモリ 76,868 KB
最終ジャッジ日時 2023-09-28 16:08:22
合計ジャッジ時間 5,151 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,120 KB
testcase_01 AC 79 ms
71,484 KB
testcase_02 AC 78 ms
71,444 KB
testcase_03 AC 79 ms
71,244 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 79 ms
71,376 KB
testcase_08 WA -
testcase_09 AC 79 ms
71,224 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 78 ms
71,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
xy=[]
for i in range(n):
    x,y=map(int,input().split())
    xy.append([x,y])

x0,y0=xy[0][0],xy[0][1]
ans=0
for i in range(1,n):
    xi,yi=xy[i][0],xy[i][1]
    dis=10**12
    for j in range(1,n):
        if j!=i:
            dis=min((xy[j][0]-xi)**2+(xy[j][1]-yi)**2,dis)
    if dis>(x0-xi)**2+(y0-yi)**2:
        ans+=1
        xy[i]=[10**11,10**11]
print(ans)
0