結果

問題 No.1041 直線大学
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2020-05-01 21:29:32
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 497 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 87,364 KB
実行使用メモリ 77,576 KB
最終ジャッジ日時 2023-08-26 06:50:42
合計ジャッジ時間 4,963 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,360 KB
testcase_01 AC 72 ms
71,560 KB
testcase_02 AC 74 ms
71,564 KB
testcase_03 AC 71 ms
71,436 KB
testcase_04 AC 72 ms
71,508 KB
testcase_05 AC 74 ms
71,496 KB
testcase_06 AC 74 ms
71,544 KB
testcase_07 AC 73 ms
71,196 KB
testcase_08 AC 74 ms
71,524 KB
testcase_09 AC 74 ms
71,176 KB
testcase_10 AC 82 ms
76,388 KB
testcase_11 AC 83 ms
76,272 KB
testcase_12 AC 83 ms
76,324 KB
testcase_13 AC 75 ms
71,464 KB
testcase_14 WA -
testcase_15 AC 76 ms
71,332 KB
testcase_16 AC 91 ms
76,332 KB
testcase_17 AC 73 ms
71,640 KB
testcase_18 AC 84 ms
76,468 KB
testcase_19 AC 89 ms
76,492 KB
testcase_20 AC 71 ms
71,588 KB
testcase_21 WA -
testcase_22 AC 72 ms
71,192 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 89 ms
76,416 KB
testcase_26 AC 74 ms
71,508 KB
testcase_27 AC 74 ms
71,448 KB
testcase_28 AC 71 ms
71,340 KB
testcase_29 AC 72 ms
71,288 KB
testcase_30 AC 73 ms
71,292 KB
testcase_31 AC 73 ms
71,364 KB
testcase_32 AC 74 ms
71,580 KB
testcase_33 AC 71 ms
71,288 KB
testcase_34 AC 72 ms
71,504 KB
testcase_35 AC 73 ms
71,196 KB
testcase_36 AC 71 ms
71,500 KB
testcase_37 AC 72 ms
71,440 KB
testcase_38 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N = int(input())

XY = []

for i in range(N):

    x,y = map(int,input().split())
    XY.append([x,y])

ans = 1

for i in range(N):

    ox,oy = XY[i]
    dic = {}

    for j in range(i):

        nx,ny = XY[j]

        x = ox-nx
        y = oy-ny

        XX = x // math.gcd(x,y)
        YY = y // math.gcd(x,y)

        if (XX,YY) not in dic:
            dic[(XX,YY)] = 1
        else:
            dic[(XX,YY)] += 1

    for t in dic:
        ans = max(ans,dic[t] + 1)

print (ans)
0