結果

問題 No.1041 直線大学
ユーザー Omura ShunsukeOmura Shunsuke
提出日時 2020-05-02 15:09:14
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 696 bytes
コンパイル時間 441 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 77,144 KB
最終ジャッジ日時 2023-08-28 18:11:25
合計ジャッジ時間 4,785 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,400 KB
testcase_01 AC 66 ms
71,236 KB
testcase_02 AC 68 ms
71,224 KB
testcase_03 AC 70 ms
71,372 KB
testcase_04 AC 67 ms
71,108 KB
testcase_05 AC 67 ms
71,100 KB
testcase_06 AC 67 ms
71,084 KB
testcase_07 AC 69 ms
71,236 KB
testcase_08 AC 70 ms
71,280 KB
testcase_09 AC 70 ms
71,336 KB
testcase_10 AC 82 ms
76,220 KB
testcase_11 AC 80 ms
76,592 KB
testcase_12 AC 82 ms
76,424 KB
testcase_13 AC 78 ms
76,604 KB
testcase_14 AC 86 ms
76,376 KB
testcase_15 AC 80 ms
76,676 KB
testcase_16 AC 83 ms
76,500 KB
testcase_17 WA -
testcase_18 AC 83 ms
76,520 KB
testcase_19 AC 85 ms
76,716 KB
testcase_20 AC 67 ms
71,260 KB
testcase_21 AC 83 ms
76,524 KB
testcase_22 AC 67 ms
71,144 KB
testcase_23 AC 94 ms
77,144 KB
testcase_24 AC 87 ms
76,532 KB
testcase_25 AC 84 ms
76,524 KB
testcase_26 AC 70 ms
71,332 KB
testcase_27 AC 77 ms
76,636 KB
testcase_28 AC 67 ms
71,316 KB
testcase_29 AC 66 ms
71,184 KB
testcase_30 AC 67 ms
71,120 KB
testcase_31 AC 68 ms
71,316 KB
testcase_32 AC 67 ms
71,276 KB
testcase_33 AC 69 ms
71,428 KB
testcase_34 AC 69 ms
71,304 KB
testcase_35 AC 68 ms
71,404 KB
testcase_36 AC 67 ms
71,472 KB
testcase_37 AC 65 ms
71,368 KB
testcase_38 AC 87 ms
76,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def line(x1,y1,x2,y2):
    if x1==x2:
        return ("I",x1)
    elif y1==y2:
        return (y1,"I")
    else:
        #Y=aX+b
        a=(y1-y2)/(x1-x2)
        return (y1-(a*x1),a)

N=int(input())
L=[]
D={}
for i in range(N):
    x,y=map(int,input().split())
    L.append([x,y])

for i in range(N):
    for j in range(N):
        if i==j:
            continue
        else:
            if line(L[i][0],L[i][1],L[j][0],L[j][1]) not in D:
                D[line(L[i][0],L[i][1],L[j][0],L[j][1])]=1
            else:
                D[line(L[i][0],L[i][1],L[j][0],L[j][1])]+=1
Max=max(D.values())
#print(D)
#print(Max)
for i in range(1,10**3):
    if i*(i-1)==Max:
        print(i)
        exit()
0