結果
問題 |
No.1041 直線大学
|
ユーザー |
|
提出日時 | 2021-08-16 20:55:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 406 bytes |
コンパイル時間 | 387 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 16,256 KB |
最終ジャッジ日時 | 2024-10-09 18:10:03 |
合計ジャッジ時間 | 4,790 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 1 WA * 6 TLE * 1 -- * 29 |
ソースコード
from math import sqrt N=int(input()) coords=list() for i in range(N): X,Y=map(int,input().split()) coords.append(complex(X,Y)) ms=[coords[j]-coords[i] for i in range(N) for j in range(i+1,N)] ans=0 for i in range(len(ms)): s_i=0 for j in range(len(ms)): if (ms[i]*ms[j].conjugate()).imag==0: s_i+=1 if ans<s_i:ans=s_i ans=int(sqrt(8*ans+1)+1)//2 print(ans)