結果

問題 No.1041 直線大学
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2020-05-01 21:31:02
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 559 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 71,680 KB
最終ジャッジ日時 2024-04-28 00:11:00
合計ジャッジ時間 2,683 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
51,968 KB
testcase_01 AC 36 ms
51,968 KB
testcase_02 AC 34 ms
51,968 KB
testcase_03 AC 35 ms
51,840 KB
testcase_04 AC 39 ms
52,608 KB
testcase_05 AC 33 ms
51,840 KB
testcase_06 AC 34 ms
52,096 KB
testcase_07 AC 34 ms
52,480 KB
testcase_08 AC 33 ms
52,480 KB
testcase_09 AC 34 ms
52,608 KB
testcase_10 AC 47 ms
61,184 KB
testcase_11 AC 43 ms
60,800 KB
testcase_12 AC 45 ms
60,672 KB
testcase_13 AC 37 ms
52,992 KB
testcase_14 AC 58 ms
67,328 KB
testcase_15 AC 37 ms
53,376 KB
testcase_16 AC 52 ms
65,152 KB
testcase_17 AC 35 ms
52,224 KB
testcase_18 AC 46 ms
62,080 KB
testcase_19 AC 52 ms
65,408 KB
testcase_20 AC 34 ms
51,968 KB
testcase_21 AC 51 ms
63,360 KB
testcase_22 AC 37 ms
51,968 KB
testcase_23 AC 68 ms
70,272 KB
testcase_24 AC 62 ms
67,072 KB
testcase_25 AC 49 ms
63,360 KB
testcase_26 AC 36 ms
52,608 KB
testcase_27 AC 37 ms
53,376 KB
testcase_28 AC 39 ms
51,968 KB
testcase_29 AC 35 ms
51,968 KB
testcase_30 AC 33 ms
51,840 KB
testcase_31 AC 33 ms
52,068 KB
testcase_32 AC 36 ms
51,968 KB
testcase_33 AC 32 ms
52,352 KB
testcase_34 AC 31 ms
52,096 KB
testcase_35 AC 33 ms
52,224 KB
testcase_36 AC 32 ms
51,968 KB
testcase_37 AC 32 ms
52,224 KB
testcase_38 AC 66 ms
71,680 KB
testcase_39 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 < 0:
            XX *= -1
            YY *= -1

        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