結果

問題 No.1041 直線大学
ユーザー iet461_kyopro
提出日時 2020-05-01 21:35:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 397 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 82,128 KB
実行使用メモリ 62,336 KB
最終ジャッジ日時 2024-11-16 07:48:52
合計ジャッジ時間 3,518 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
xy = [list(map(int, input().split())) for i in range(n)]
ans = 0
for i in range(n-1):
    basex,basey = xy[i][0],xy[i][1]
    for j in range(i+1,n):
        X,Y = xy[i][0]-xy[j][0], xy[i][1]-xy[j][1]
        tmp = 0
        for x,y in xy:
            x -= basex
            y -= basey
            if not (x*Y - y*X):
                tmp += 1
        ans = max(ans,tmp)

print(ans)
0