結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,524 KB
testcase_01 AC 38 ms
53,524 KB
testcase_02 AC 41 ms
53,524 KB
testcase_03 AC 38 ms
53,524 KB
testcase_04 AC 40 ms
53,524 KB
testcase_05 AC 39 ms
53,524 KB
testcase_06 AC 41 ms
53,524 KB
testcase_07 AC 62 ms
68,156 KB
testcase_08 AC 70 ms
70,252 KB
testcase_09 AC 64 ms
68,164 KB
testcase_10 AC 99 ms
75,876 KB
testcase_11 AC 82 ms
75,680 KB
testcase_12 AC 82 ms
75,696 KB
testcase_13 AC 62 ms
68,628 KB
testcase_14 AC 91 ms
75,948 KB
testcase_15 AC 66 ms
70,680 KB
testcase_16 AC 91 ms
75,960 KB
testcase_17 WA -
testcase_18 AC 73 ms
72,748 KB
testcase_19 AC 91 ms
75,972 KB
testcase_20 AC 38 ms
53,524 KB
testcase_21 AC 76 ms
73,076 KB
testcase_22 AC 37 ms
53,524 KB
testcase_23 AC 107 ms
76,072 KB
testcase_24 AC 102 ms
76,072 KB
testcase_25 AC 97 ms
76,072 KB
testcase_26 AC 54 ms
63,996 KB
testcase_27 AC 80 ms
73,660 KB
testcase_28 AC 40 ms
53,524 KB
testcase_29 AC 38 ms
53,524 KB
testcase_30 AC 38 ms
53,524 KB
testcase_31 AC 38 ms
53,524 KB
testcase_32 AC 37 ms
53,524 KB
testcase_33 AC 38 ms
53,524 KB
testcase_34 AC 37 ms
53,524 KB
testcase_35 AC 38 ms
53,524 KB
testcase_36 WA -
testcase_37 AC 39 ms
53,524 KB
testcase_38 AC 125 ms
76,096 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