結果

問題 No.1041 直線大学
ユーザー MaboyMaboy
提出日時 2021-09-26 18:03:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 478 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 10,856 KB
実行使用メモリ 8,000 KB
最終ジャッジ日時 2023-09-19 02:56:36
合計ジャッジ時間 2,585 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 17 ms
7,816 KB
testcase_02 RE -
testcase_03 AC 16 ms
7,820 KB
testcase_04 AC 16 ms
7,828 KB
testcase_05 AC 15 ms
7,816 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 93 ms
7,856 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 16 ms
7,884 KB
testcase_21 RE -
testcase_22 AC 16 ms
7,828 KB
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 RE -
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

def onThe(xy,xy1,xy2):
    r1 = (xy1[0] - xy[0]) / (xy1[1] - xy[1])
    r2 = (xy2[0] - xy[0]) / (xy2[1] - xy[1])
    return True if r1 == r2 else False

n = int(input())
g = [list(map(int,input().split())) for i in range(n)]
l = []

if len(g) > 2:
    for i in range(n-1):
        for j in range(i+1,n):
            t = 2
            for k in range(j+1,n):
                # print(g[i],g[j],g[k])
                t += onThe(g[i],g[j],g[k])
            l.append(t)
print(max(l))
0