結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,828 KB
testcase_01 AC 16 ms
7,864 KB
testcase_02 RE -
testcase_03 AC 18 ms
7,804 KB
testcase_04 AC 18 ms
7,852 KB
testcase_05 AC 17 ms
7,804 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 91 ms
7,780 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 17 ms
7,972 KB
testcase_21 RE -
testcase_22 AC 16 ms
7,804 KB
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 AC 16 ms
7,816 KB
testcase_29 AC 16 ms
7,824 KB
testcase_30 AC 16 ms
7,832 KB
testcase_31 AC 16 ms
7,792 KB
testcase_32 AC 16 ms
7,756 KB
testcase_33 AC 17 ms
7,760 KB
testcase_34 AC 15 ms
7,784 KB
testcase_35 AC 16 ms
7,828 KB
testcase_36 AC 16 ms
7,832 KB
testcase_37 AC 17 ms
7,828 KB
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 = [2]

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