結果

問題 No.1041 直線大学
ユーザー ohanaohana
提出日時 2023-11-06 13:52:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 491 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 82,200 KB
実行使用メモリ 76,756 KB
最終ジャッジ日時 2024-09-25 23:02:06
合計ジャッジ時間 3,664 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 35 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

A = [list(map(int, input().split())) for i in range(n)]
x, y = A[0]
ans = 0
for x, y in A:
    for ax, ay in A:
        if (ax, ay) == (x, y):
            continue
        if ax - x == 0:
            ans = max(ans, sum([1 for xx, yy in A if xx == x]))
            continue
        a = (ay - y) / (ax - x)
        b = y - a * x
        ans = max(
            ans,
            sum([1 for xx, yy in A if a * xx == int(a * xx) and int(a * xx) + b == yy]),
        )
print(ans)
0