結果

問題 No.1041 直線大学
ユーザー c-yanc-yan
提出日時 2020-05-01 21:35:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 430 bytes
コンパイル時間 410 ms
コンパイル使用メモリ 10,708 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2023-08-26 07:17:31
合計ジャッジ時間 4,138 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,764 KB
testcase_01 AC 15 ms
7,796 KB
testcase_02 AC 15 ms
7,848 KB
testcase_03 AC 16 ms
7,784 KB
testcase_04 AC 16 ms
7,928 KB
testcase_05 AC 15 ms
7,796 KB
testcase_06 AC 16 ms
7,876 KB
testcase_07 AC 19 ms
7,888 KB
testcase_08 AC 19 ms
7,808 KB
testcase_09 AC 20 ms
7,880 KB
testcase_10 AC 288 ms
7,852 KB
testcase_11 WA -
testcase_12 AC 302 ms
7,780 KB
testcase_13 AC 27 ms
7,756 KB
testcase_14 AC 138 ms
7,784 KB
testcase_15 AC 38 ms
7,828 KB
testcase_16 AC 101 ms
7,792 KB
testcase_17 AC 18 ms
7,800 KB
testcase_18 AC 53 ms
7,972 KB
testcase_19 AC 102 ms
7,756 KB
testcase_20 AC 15 ms
7,884 KB
testcase_21 AC 59 ms
7,800 KB
testcase_22 AC 15 ms
7,752 KB
testcase_23 AC 231 ms
7,880 KB
testcase_24 AC 123 ms
7,832 KB
testcase_25 WA -
testcase_26 AC 22 ms
7,972 KB
testcase_27 AC 35 ms
7,832 KB
testcase_28 WA -
testcase_29 AC 16 ms
7,776 KB
testcase_30 AC 15 ms
7,804 KB
testcase_31 AC 16 ms
7,788 KB
testcase_32 AC 16 ms
7,756 KB
testcase_33 WA -
testcase_34 AC 15 ms
7,804 KB
testcase_35 AC 15 ms
7,852 KB
testcase_36 AC 15 ms
7,816 KB
testcase_37 AC 16 ms
7,764 KB
testcase_38 AC 280 ms
7,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]

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