結果

問題 No.1041 直線大学
ユーザー pekempeypekempey
提出日時 2020-05-01 21:27:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 513 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 87,304 KB
実行使用メモリ 76,744 KB
最終ジャッジ日時 2023-08-26 06:46:16
合計ジャッジ時間 4,878 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,224 KB
testcase_01 AC 73 ms
71,444 KB
testcase_02 AC 73 ms
71,448 KB
testcase_03 AC 72 ms
71,360 KB
testcase_04 AC 75 ms
71,368 KB
testcase_05 AC 72 ms
71,224 KB
testcase_06 AC 72 ms
71,428 KB
testcase_07 AC 81 ms
76,400 KB
testcase_08 AC 80 ms
76,144 KB
testcase_09 AC 81 ms
76,240 KB
testcase_10 AC 91 ms
76,496 KB
testcase_11 AC 91 ms
76,580 KB
testcase_12 AC 88 ms
76,372 KB
testcase_13 AC 85 ms
76,600 KB
testcase_14 AC 88 ms
76,636 KB
testcase_15 AC 81 ms
76,508 KB
testcase_16 AC 84 ms
76,612 KB
testcase_17 AC 79 ms
76,152 KB
testcase_18 AC 86 ms
76,668 KB
testcase_19 AC 84 ms
76,596 KB
testcase_20 AC 76 ms
71,356 KB
testcase_21 AC 83 ms
76,256 KB
testcase_22 AC 72 ms
71,544 KB
testcase_23 AC 86 ms
76,744 KB
testcase_24 AC 85 ms
76,600 KB
testcase_25 AC 84 ms
76,596 KB
testcase_26 AC 81 ms
76,648 KB
testcase_27 AC 82 ms
76,432 KB
testcase_28 AC 73 ms
71,424 KB
testcase_29 AC 74 ms
71,588 KB
testcase_30 AC 75 ms
71,516 KB
testcase_31 AC 76 ms
71,428 KB
testcase_32 AC 74 ms
71,500 KB
testcase_33 AC 73 ms
71,264 KB
testcase_34 AC 75 ms
71,436 KB
testcase_35 AC 72 ms
71,408 KB
testcase_36 AC 71 ms
71,184 KB
testcase_37 AC 72 ms
71,280 KB
testcase_38 AC 93 ms
76,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def input_int():
    return int(input())

def input_ints():
    return list(map(int, input().split()))

N = input_int()
P = []
for _ in range(N):
    x, y = input_ints()
    P.append((x, y))

def det(a, b, c, d):
    return a * d - b * c

ans = 0
for i in range(N):
    for j in range(i + 1, N):
        cnt = 2
        for k in range(j + 1, N):
            if det(P[j][0] - P[i][0], P[j][1] - P[i][1], P[k][0] - P[i][0], P[k][1] - P[i][1]) == 0:
                cnt += 1
        ans = max(ans, cnt)

print(ans)

0