結果

問題 No.1041 直線大学
ユーザー lllllll88938494
提出日時 2022-01-19 10:27:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 379 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 63,872 KB
最終ジャッジ日時 2024-11-16 08:12:57
合計ジャッジ時間 3,034 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
ns=[list(map(int,input().split())) for i in range(n)]

ans=0

for i in range(n-1):
    a,b=ns[i]
    for j in range(i+1,n):
        c,d=ns[j]
        cnt=2
        for k in range(n):
            if i == k or j == k:
                continue
            e,f=ns[k]
            if (f-b)*(c-a) == (d-b)*(e-a):
                cnt+=1
        ans=max(ans,cnt)
print(ans)
0