結果

問題 No.1041 直線大学
ユーザー ohanaohana
提出日時 2023-11-06 14:03:44
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 476 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 81,884 KB
実行使用メモリ 88,232 KB
最終ジャッジ日時 2023-11-06 14:03:54
合計ジャッジ時間 10,441 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
83,708 KB
testcase_01 AC 129 ms
79,336 KB
testcase_02 AC 116 ms
79,336 KB
testcase_03 AC 137 ms
81,084 KB
testcase_04 AC 174 ms
81,560 KB
testcase_05 AC 114 ms
79,336 KB
testcase_06 AC 180 ms
81,616 KB
testcase_07 AC 530 ms
83,932 KB
testcase_08 AC 574 ms
84,332 KB
testcase_09 AC 567 ms
84,064 KB
testcase_10 TLE -
testcase_11 AC 524 ms
82,924 KB
testcase_12 TLE -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import decimal

n = int(input())
A = [list(map(decimal.Decimal, input().split())) for i in range(n)]

ans = 0
for i in range(n):
    for j in range(i + 1, n):
        x1, y1 = A[i]
        x2, y2 = A[j]
        if x1 == x2:
            ans = max(ans, sum([1 for x, y in A if x == x1]))
            continue
        t = 0
        for x, y in A:
            if abs((y2 - y1) / (x2 - x1) * (x - x1) + y1 - y) < 0.0001:
                t += 1
        ans = max(ans, t)
print(ans)
0