結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
55,996 KB
testcase_01 AC 40 ms
54,160 KB
testcase_02 AC 41 ms
55,260 KB
testcase_03 AC 41 ms
53,920 KB
testcase_04 AC 41 ms
55,148 KB
testcase_05 AC 40 ms
54,520 KB
testcase_06 AC 41 ms
54,168 KB
testcase_07 AC 42 ms
55,392 KB
testcase_08 AC 41 ms
55,736 KB
testcase_09 AC 41 ms
54,780 KB
testcase_10 AC 50 ms
64,180 KB
testcase_11 AC 53 ms
64,028 KB
testcase_12 AC 52 ms
65,316 KB
testcase_13 AC 42 ms
55,056 KB
testcase_14 WA -
testcase_15 AC 43 ms
56,536 KB
testcase_16 AC 57 ms
67,644 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 54 ms
65,708 KB
testcase_20 AC 40 ms
54,464 KB
testcase_21 WA -
testcase_22 AC 40 ms
54,528 KB
testcase_23 AC 63 ms
70,640 KB
testcase_24 AC 58 ms
66,812 KB
testcase_25 WA -
testcase_26 AC 40 ms
55,452 KB
testcase_27 AC 42 ms
56,480 KB
testcase_28 AC 39 ms
54,436 KB
testcase_29 AC 40 ms
54,688 KB
testcase_30 AC 39 ms
55,932 KB
testcase_31 AC 39 ms
54,216 KB
testcase_32 AC 41 ms
55,132 KB
testcase_33 AC 39 ms
55,220 KB
testcase_34 AC 40 ms
54,304 KB
testcase_35 AC 41 ms
54,688 KB
testcase_36 AC 40 ms
54,924 KB
testcase_37 AC 39 ms
55,664 KB
testcase_38 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
from collections import Counter
def yakubun(a,b):
    g = math.gcd(a,b)
    return (a//g,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