結果
問題 |
No.1041 直線大学
|
ユーザー |
![]() |
提出日時 | 2020-05-11 13:42:12 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 437 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-18 09:55:27 |
合計ジャッジ時間 | 3,625 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 WA * 13 |
ソースコード
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 a=(y1-y2)/(x1-x2) b=y1-a*x1 for x,y in l: if y==int(a*x+b): tmp+=1 ans=max(ans,tmp) print(ans)