結果

問題 No.1041 直線大学
ユーザー ohanaohana
提出日時 2023-11-06 13:52:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 491 bytes
コンパイル時間 519 ms
コンパイル使用メモリ 81,880 KB
実行使用メモリ 76,100 KB
最終ジャッジ日時 2023-11-06 13:52:30
合計ジャッジ時間 5,245 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,524 KB
testcase_01 AC 37 ms
53,524 KB
testcase_02 AC 37 ms
53,524 KB
testcase_03 AC 36 ms
53,524 KB
testcase_04 AC 37 ms
53,524 KB
testcase_05 AC 37 ms
53,524 KB
testcase_06 AC 37 ms
53,524 KB
testcase_07 AC 61 ms
68,156 KB
testcase_08 AC 66 ms
70,252 KB
testcase_09 AC 63 ms
68,164 KB
testcase_10 AC 97 ms
75,840 KB
testcase_11 AC 80 ms
75,684 KB
testcase_12 AC 81 ms
75,700 KB
testcase_13 AC 60 ms
68,632 KB
testcase_14 AC 88 ms
75,952 KB
testcase_15 AC 64 ms
70,684 KB
testcase_16 AC 89 ms
75,964 KB
testcase_17 WA -
testcase_18 AC 71 ms
72,752 KB
testcase_19 AC 89 ms
75,980 KB
testcase_20 AC 37 ms
53,524 KB
testcase_21 AC 74 ms
73,084 KB
testcase_22 AC 38 ms
53,524 KB
testcase_23 AC 104 ms
76,072 KB
testcase_24 AC 99 ms
76,072 KB
testcase_25 AC 93 ms
76,072 KB
testcase_26 AC 52 ms
63,996 KB
testcase_27 AC 76 ms
73,664 KB
testcase_28 AC 37 ms
53,524 KB
testcase_29 AC 37 ms
53,524 KB
testcase_30 AC 38 ms
53,524 KB
testcase_31 AC 37 ms
53,524 KB
testcase_32 AC 37 ms
53,524 KB
testcase_33 AC 37 ms
53,524 KB
testcase_34 AC 37 ms
53,524 KB
testcase_35 AC 37 ms
53,524 KB
testcase_36 WA -
testcase_37 AC 36 ms
53,524 KB
testcase_38 AC 120 ms
76,100 KB
権限があれば一括ダウンロードができます

ソースコード

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