結果

問題 No.1041 直線大学
ユーザー roarisroaris
提出日時 2020-05-01 21:26:30
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 472 bytes
コンパイル時間 584 ms
コンパイル使用メモリ 86,940 KB
実行使用メモリ 77,484 KB
最終ジャッジ日時 2023-08-26 06:44:29
合計ジャッジ時間 5,288 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
71,564 KB
testcase_01 AC 83 ms
71,560 KB
testcase_02 AC 81 ms
71,528 KB
testcase_03 AC 80 ms
71,532 KB
testcase_04 AC 79 ms
71,624 KB
testcase_05 AC 78 ms
71,168 KB
testcase_06 AC 80 ms
71,524 KB
testcase_07 AC 90 ms
76,708 KB
testcase_08 AC 91 ms
77,424 KB
testcase_09 AC 91 ms
76,632 KB
testcase_10 AC 96 ms
77,256 KB
testcase_11 AC 95 ms
77,236 KB
testcase_12 AC 92 ms
77,276 KB
testcase_13 AC 89 ms
77,304 KB
testcase_14 AC 91 ms
77,296 KB
testcase_15 AC 89 ms
77,236 KB
testcase_16 AC 91 ms
77,424 KB
testcase_17 AC 89 ms
76,668 KB
testcase_18 AC 94 ms
77,484 KB
testcase_19 AC 92 ms
77,264 KB
testcase_20 AC 82 ms
71,604 KB
testcase_21 AC 93 ms
77,284 KB
testcase_22 AC 81 ms
71,388 KB
testcase_23 AC 96 ms
77,408 KB
testcase_24 AC 92 ms
77,216 KB
testcase_25 AC 95 ms
77,212 KB
testcase_26 AC 89 ms
77,036 KB
testcase_27 AC 90 ms
77,272 KB
testcase_28 AC 80 ms
71,312 KB
testcase_29 AC 78 ms
71,156 KB
testcase_30 AC 82 ms
71,452 KB
testcase_31 AC 80 ms
71,376 KB
testcase_32 AC 81 ms
71,260 KB
testcase_33 AC 81 ms
71,408 KB
testcase_34 AC 79 ms
71,596 KB
testcase_35 AC 81 ms
71,448 KB
testcase_36 AC 81 ms
71,548 KB
testcase_37 AC 76 ms
71,504 KB
testcase_38 AC 99 ms
77,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import *

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 (yj-yi)*(xk-xj)==(yk-yj)*(xj-xi):
                ans_cand += 1
        
        ans = max(ans, ans_cand)

print(ans)
0