結果

問題 No.1041 直線大学
ユーザー roarisroaris
提出日時 2020-05-08 15:22:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 407 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 82,204 KB
実行使用メモリ 63,740 KB
最終ジャッジ日時 2024-04-28 00:15:36
合計ジャッジ時間 3,048 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,068 KB
testcase_01 AC 38 ms
52,852 KB
testcase_02 AC 38 ms
52,336 KB
testcase_03 AC 39 ms
52,776 KB
testcase_04 AC 39 ms
52,340 KB
testcase_05 AC 37 ms
52,976 KB
testcase_06 AC 39 ms
52,900 KB
testcase_07 AC 47 ms
60,744 KB
testcase_08 AC 49 ms
62,812 KB
testcase_09 AC 48 ms
61,404 KB
testcase_10 AC 55 ms
62,600 KB
testcase_11 AC 56 ms
62,792 KB
testcase_12 AC 54 ms
61,412 KB
testcase_13 AC 47 ms
61,904 KB
testcase_14 AC 50 ms
62,192 KB
testcase_15 AC 47 ms
61,824 KB
testcase_16 AC 50 ms
62,532 KB
testcase_17 AC 44 ms
59,720 KB
testcase_18 AC 51 ms
63,740 KB
testcase_19 AC 51 ms
62,340 KB
testcase_20 AC 38 ms
52,336 KB
testcase_21 AC 49 ms
62,912 KB
testcase_22 AC 38 ms
53,304 KB
testcase_23 AC 54 ms
62,660 KB
testcase_24 AC 54 ms
63,704 KB
testcase_25 AC 51 ms
62,808 KB
testcase_26 AC 45 ms
60,164 KB
testcase_27 AC 51 ms
63,120 KB
testcase_28 AC 38 ms
53,352 KB
testcase_29 AC 38 ms
53,188 KB
testcase_30 AC 37 ms
53,024 KB
testcase_31 AC 38 ms
52,652 KB
testcase_32 AC 38 ms
51,760 KB
testcase_33 AC 38 ms
52,560 KB
testcase_34 AC 38 ms
53,324 KB
testcase_35 AC 38 ms
52,428 KB
testcase_36 AC 38 ms
52,448 KB
testcase_37 AC 37 ms
53,724 KB
testcase_38 AC 59 ms
63,336 KB
testcase_39 AC 47 ms
61,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for i in range(N):
    Xi, Yi = XY[i]
    
    for j in range(i+1, N):
        Xj, Yj = XY[j]
        ans_cand = 0
        
        for k in range(N):
            Xk, Yk = XY[k]
            
            if (Yk-Yj)*(Xj-Xi)==(Yj-Yi)*(Xk-Xj):
                ans_cand += 1
        
        ans = max(ans, ans_cand)

print(ans)
0