結果
| 問題 | No.1265 Balloon Survival |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-22 20:33:27 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 1,231 ms / 2,000 ms |
| コード長 | 345 bytes |
| 記録 | |
| コンパイル時間 | 413 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 146,384 KB |
| 最終ジャッジ日時 | 2026-05-22 20:33:55 |
| 合計ジャッジ時間 | 15,939 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
| 純コード判定待ち |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 32 |
ソースコード
n=int(input())
x=[]
y=[]
for i in range(n):
a,b=map(int,input().split());p=0
for j,l in x:
y.append(((a-j)**2+(b-l)**2,i,p))
p+=1
x.append((a,b))
y.sort()
ans=0;a=[0]*n
for i,j,l in y:
if a[j] or a[l]:
continue
if not j or not l:
ans+=1;a[max(j,l)]=1
else:
a[j]=1;a[l]=1
print(ans)