結果
問題 |
No.1041 直線大学
|
ユーザー |
![]() |
提出日時 | 2020-05-11 13:48:21 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 289 ms / 2,000 ms |
コード長 | 427 bytes |
コンパイル時間 | 181 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-16 08:02:20 |
合計ジャッジ時間 | 3,600 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 37 |
ソースコード
n=int(input()) l=[[int(j) for j in input().split()]for i in range(n)] import itertools ans=0 for i,j in itertools.combinations(range(n),2): x1,y1=l[i] x2,y2=l[j] tmp=0 if x1-x2==0: for x,y in l: if x==x1: tmp+=1 ans=max(ans,tmp) continue for x,y in l: if abs((y1-y2)/(x1-x2)*(x-x1)+y1-y)<0.0001: tmp+=1 ans=max(ans,tmp) print(ans)