結果
| 問題 | No.1265 Balloon Survival |
| ユーザー |
|
| 提出日時 | 2026-05-22 20:33:27 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1,121 ms / 2,000 ms |
| + 15µs | |
| コード長 | 345 bytes |
| 記録 | |
| コンパイル時間 | 1,281 ms |
| コンパイル使用メモリ | 64,372 KB |
| 実行使用メモリ | 136,892 KB |
| 最終ジャッジ日時 | 2026-11-13 13:04:17 |
| 合計ジャッジ時間 | 17,640 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 35 |
ソースコード
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)