結果
問題 |
No.3074 Divide Points Fairly
|
ユーザー |
👑 |
提出日時 | 2025-02-16 19:56:38 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 324 bytes |
コンパイル時間 | 325 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 30,592 KB |
最終ジャッジ日時 | 2025-03-27 12:52:29 |
合計ジャッジ時間 | 19,256 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 TLE * 1 -- * 14 |
コンパイルメッセージ
Main.py:20: SyntaxWarning: invalid decimal literal if h<1and d==N:exit(print(1,b,r))
ソースコード
import random R=range J=lambda:list(map(int,input().split())) N,*_=J() P=[J()for i in R(N*2)] L=9**5 C=L*L def D(c): h=d=0 for x,y in P: v=x+b*y+c;h|=v==0;d+=v>0 return h,d while 1: b,l,r=random.randint(-L,L),-C,C while l+1<r: m=(l+r)>>1;h,d=D(m) if d<N:l=m else:r=m h,d=D(r) if h<1and d==N:exit(print(1,b,r))