結果

問題 No.1041 直線大学
ユーザー 👑 timitimi
提出日時 2020-09-18 09:43:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 482 bytes
コンパイル時間 647 ms
コンパイル使用メモリ 10,752 KB
実行使用メモリ 7,956 KB
最終ジャッジ日時 2023-09-04 08:28:35
合計ジャッジ時間 4,088 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,748 KB
testcase_01 AC 16 ms
7,940 KB
testcase_02 AC 16 ms
7,828 KB
testcase_03 AC 16 ms
7,820 KB
testcase_04 AC 17 ms
7,908 KB
testcase_05 AC 16 ms
7,872 KB
testcase_06 AC 16 ms
7,752 KB
testcase_07 AC 20 ms
7,956 KB
testcase_08 AC 21 ms
7,792 KB
testcase_09 AC 21 ms
7,828 KB
testcase_10 AC 301 ms
7,820 KB
testcase_11 WA -
testcase_12 AC 295 ms
7,916 KB
testcase_13 AC 29 ms
7,796 KB
testcase_14 AC 143 ms
7,828 KB
testcase_15 AC 41 ms
7,760 KB
testcase_16 AC 106 ms
7,852 KB
testcase_17 AC 20 ms
7,824 KB
testcase_18 AC 54 ms
7,824 KB
testcase_19 AC 108 ms
7,756 KB
testcase_20 AC 17 ms
7,952 KB
testcase_21 AC 62 ms
7,756 KB
testcase_22 AC 16 ms
7,808 KB
testcase_23 AC 249 ms
7,780 KB
testcase_24 AC 132 ms
7,860 KB
testcase_25 WA -
testcase_26 AC 23 ms
7,828 KB
testcase_27 AC 37 ms
7,748 KB
testcase_28 WA -
testcase_29 AC 16 ms
7,816 KB
testcase_30 AC 16 ms
7,880 KB
testcase_31 AC 16 ms
7,808 KB
testcase_32 AC 16 ms
7,904 KB
testcase_33 WA -
testcase_34 AC 16 ms
7,776 KB
testcase_35 AC 17 ms
7,828 KB
testcase_36 AC 16 ms
7,848 KB
testcase_37 AC 16 ms
7,756 KB
testcase_38 AC 290 ms
7,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=[]
for i in range(N):
    x,y=map(int, input().split())
    A.append((x,y))
ans=0
for i in range(N-1):
    for j in range(i+1,N):
        cnt=0
        x1,y1=A[i][0],A[i][1]
        x2,y2=A[j][0],A[j][1]
        if x1-x2!=0:
            for k in range(N):
                x,y=A[k][0],A[k][1]
                if y-y1==((y2-y1)/(x2-x1))*(x-x1):
                    cnt+=1
        else:
            if x==x1:
                cnt+=1 
        ans=max(ans,cnt)
print(ans)
0