結果

問題 No.1041 直線大学
ユーザー fusmafusma
提出日時 2020-05-20 16:16:12
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 387 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 82,024 KB
実行使用メモリ 72,440 KB
最終ジャッジ日時 2024-04-09 22:59:20
合計ジャッジ時間 3,068 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
55,396 KB
testcase_01 AC 41 ms
54,948 KB
testcase_02 AC 40 ms
54,700 KB
testcase_03 AC 40 ms
55,932 KB
testcase_04 AC 41 ms
54,680 KB
testcase_05 AC 41 ms
54,408 KB
testcase_06 AC 40 ms
55,872 KB
testcase_07 AC 41 ms
54,856 KB
testcase_08 AC 45 ms
56,112 KB
testcase_09 AC 42 ms
55,700 KB
testcase_10 AC 52 ms
65,100 KB
testcase_11 AC 54 ms
64,360 KB
testcase_12 AC 52 ms
65,352 KB
testcase_13 AC 43 ms
54,784 KB
testcase_14 AC 62 ms
68,392 KB
testcase_15 AC 44 ms
56,572 KB
testcase_16 AC 60 ms
67,684 KB
testcase_17 AC 43 ms
55,200 KB
testcase_18 AC 52 ms
64,348 KB
testcase_19 AC 58 ms
67,288 KB
testcase_20 AC 41 ms
54,108 KB
testcase_21 WA -
testcase_22 AC 40 ms
55,348 KB
testcase_23 AC 69 ms
71,100 KB
testcase_24 AC 60 ms
68,472 KB
testcase_25 AC 54 ms
65,020 KB
testcase_26 AC 43 ms
55,148 KB
testcase_27 AC 43 ms
56,732 KB
testcase_28 AC 40 ms
55,052 KB
testcase_29 AC 41 ms
54,372 KB
testcase_30 AC 41 ms
56,080 KB
testcase_31 AC 41 ms
54,572 KB
testcase_32 AC 40 ms
54,508 KB
testcase_33 AC 40 ms
55,336 KB
testcase_34 AC 41 ms
54,908 KB
testcase_35 AC 39 ms
54,552 KB
testcase_36 AC 40 ms
54,556 KB
testcase_37 AC 41 ms
55,692 KB
testcase_38 AC 69 ms
72,440 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
from collections import Counter
def yakubun(a,b):
    g = math.gcd(a,b)
    return (math.copysign(1,b) * (a//g)  ,abs(b//g))
ans = 0
N = int(input())
XY = [[int(hoge) for hoge in input().split()] for n in range(N)]
for s in range(N-1):
    sx,sy = XY[s]
    G = [yakubun(gx-sx,gy-sy) for gx,gy in XY[s+1:]]
    C = Counter(G)
    ans = max(ans,1 + max(C.values()))
print(ans)
0