結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,516 KB
testcase_01 AC 38 ms
53,516 KB
testcase_02 AC 39 ms
53,516 KB
testcase_03 AC 39 ms
53,516 KB
testcase_04 AC 39 ms
53,516 KB
testcase_05 AC 38 ms
53,516 KB
testcase_06 AC 39 ms
53,516 KB
testcase_07 AC 62 ms
68,140 KB
testcase_08 AC 69 ms
70,236 KB
testcase_09 AC 64 ms
68,148 KB
testcase_10 AC 115 ms
75,824 KB
testcase_11 AC 82 ms
75,668 KB
testcase_12 AC 86 ms
75,688 KB
testcase_13 AC 63 ms
68,616 KB
testcase_14 AC 92 ms
75,932 KB
testcase_15 AC 67 ms
70,668 KB
testcase_16 AC 94 ms
75,944 KB
testcase_17 WA -
testcase_18 AC 73 ms
72,736 KB
testcase_19 AC 93 ms
75,960 KB
testcase_20 AC 39 ms
53,516 KB
testcase_21 AC 78 ms
73,080 KB
testcase_22 AC 39 ms
53,516 KB
testcase_23 AC 110 ms
76,056 KB
testcase_24 AC 102 ms
76,056 KB
testcase_25 AC 96 ms
76,056 KB
testcase_26 AC 54 ms
63,980 KB
testcase_27 AC 78 ms
73,648 KB
testcase_28 AC 39 ms
53,516 KB
testcase_29 AC 38 ms
53,516 KB
testcase_30 AC 39 ms
53,516 KB
testcase_31 AC 39 ms
53,516 KB
testcase_32 AC 38 ms
53,516 KB
testcase_33 AC 38 ms
53,516 KB
testcase_34 AC 38 ms
53,516 KB
testcase_35 AC 38 ms
53,516 KB
testcase_36 WA -
testcase_37 AC 39 ms
53,516 KB
testcase_38 AC 130 ms
76,084 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