結果

問題 No.1041 直線大学
ユーザー pekempeypekempey
提出日時 2020-05-01 21:27:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 54 ms / 2,000 ms
コード長 513 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 65,280 KB
最終ジャッジ日時 2024-04-28 00:10:22
合計ジャッジ時間 2,604 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
51,712 KB
testcase_01 AC 32 ms
51,712 KB
testcase_02 AC 34 ms
51,840 KB
testcase_03 AC 32 ms
51,840 KB
testcase_04 AC 33 ms
51,968 KB
testcase_05 AC 33 ms
51,968 KB
testcase_06 AC 32 ms
51,968 KB
testcase_07 AC 41 ms
60,416 KB
testcase_08 AC 38 ms
59,008 KB
testcase_09 AC 42 ms
60,032 KB
testcase_10 AC 51 ms
65,024 KB
testcase_11 AC 52 ms
64,640 KB
testcase_12 AC 49 ms
62,720 KB
testcase_13 AC 45 ms
62,080 KB
testcase_14 AC 49 ms
63,872 KB
testcase_15 AC 42 ms
60,032 KB
testcase_16 AC 47 ms
62,208 KB
testcase_17 AC 40 ms
59,008 KB
testcase_18 AC 47 ms
62,208 KB
testcase_19 AC 47 ms
62,464 KB
testcase_20 AC 34 ms
51,968 KB
testcase_21 AC 46 ms
62,464 KB
testcase_22 AC 32 ms
51,840 KB
testcase_23 AC 50 ms
63,360 KB
testcase_24 AC 50 ms
63,232 KB
testcase_25 AC 47 ms
62,464 KB
testcase_26 AC 42 ms
59,776 KB
testcase_27 AC 41 ms
60,416 KB
testcase_28 AC 32 ms
51,840 KB
testcase_29 AC 33 ms
51,840 KB
testcase_30 AC 34 ms
52,096 KB
testcase_31 AC 34 ms
51,712 KB
testcase_32 AC 33 ms
51,840 KB
testcase_33 AC 34 ms
51,584 KB
testcase_34 AC 34 ms
51,968 KB
testcase_35 AC 35 ms
51,968 KB
testcase_36 AC 32 ms
52,096 KB
testcase_37 AC 32 ms
51,584 KB
testcase_38 AC 54 ms
65,280 KB
testcase_39 AC 42 ms
59,904 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