結果

問題 No.1041 直線大学
ユーザー osrgy01osrgy01
提出日時 2021-06-03 13:40:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 292 ms / 2,000 ms
コード長 352 bytes
コンパイル時間 585 ms
コンパイル使用メモリ 10,964 KB
実行使用メモリ 7,920 KB
最終ジャッジ日時 2023-08-10 13:48:21
合計ジャッジ時間 6,055 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,840 KB
testcase_01 AC 15 ms
7,712 KB
testcase_02 AC 15 ms
7,892 KB
testcase_03 AC 15 ms
7,788 KB
testcase_04 AC 15 ms
7,836 KB
testcase_05 AC 15 ms
7,884 KB
testcase_06 AC 15 ms
7,772 KB
testcase_07 AC 19 ms
7,904 KB
testcase_08 AC 19 ms
7,740 KB
testcase_09 AC 21 ms
7,764 KB
testcase_10 AC 239 ms
7,712 KB
testcase_11 AC 270 ms
7,716 KB
testcase_12 AC 292 ms
7,828 KB
testcase_13 AC 27 ms
7,884 KB
testcase_14 AC 139 ms
7,788 KB
testcase_15 AC 40 ms
7,716 KB
testcase_16 AC 104 ms
7,912 KB
testcase_17 AC 18 ms
7,764 KB
testcase_18 AC 53 ms
7,752 KB
testcase_19 AC 107 ms
7,748 KB
testcase_20 AC 16 ms
7,904 KB
testcase_21 AC 63 ms
7,768 KB
testcase_22 AC 15 ms
7,880 KB
testcase_23 AC 245 ms
7,896 KB
testcase_24 AC 135 ms
7,904 KB
testcase_25 AC 65 ms
7,824 KB
testcase_26 AC 21 ms
7,836 KB
testcase_27 AC 36 ms
7,748 KB
testcase_28 AC 16 ms
7,848 KB
testcase_29 AC 15 ms
7,920 KB
testcase_30 AC 16 ms
7,824 KB
testcase_31 AC 15 ms
7,708 KB
testcase_32 AC 15 ms
7,840 KB
testcase_33 AC 15 ms
7,896 KB
testcase_34 AC 15 ms
7,704 KB
testcase_35 AC 14 ms
7,768 KB
testcase_36 AC 15 ms
7,716 KB
testcase_37 AC 15 ms
7,796 KB
testcase_38 AC 281 ms
7,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
xy=[[*map(int,input().split())] for _ in range(n)]
ans=2
for a in range(n):
    for b in range(a+1,n):
        dx=xy[a][0]-xy[b][0]
        dy=xy[a][1]-xy[b][1]
        cnt=0
        for i in range(n):
            dx2=xy[a][0]-xy[i][0]
            dy2=xy[a][1]-xy[i][1]
            cnt+=dy*dx2==dy2*dx
        ans=max(ans,cnt)
print(ans)
0