結果

問題 No.2355 Unhappy Back Dance
ユーザー navel_tosnavel_tos
提出日時 2023-06-17 01:18:36
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 913 bytes
コンパイル時間 377 ms
コンパイル使用メモリ 87,284 KB
実行使用メモリ 100,880 KB
最終ジャッジ日時 2023-09-07 00:11:34
合計ジャッジ時間 15,680 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 219 ms
89,668 KB
testcase_01 AC 225 ms
89,572 KB
testcase_02 AC 219 ms
89,512 KB
testcase_03 AC 218 ms
89,572 KB
testcase_04 AC 219 ms
89,532 KB
testcase_05 AC 219 ms
89,536 KB
testcase_06 AC 290 ms
92,000 KB
testcase_07 AC 278 ms
92,096 KB
testcase_08 AC 280 ms
92,052 KB
testcase_09 AC 290 ms
92,244 KB
testcase_10 AC 824 ms
98,368 KB
testcase_11 AC 919 ms
100,880 KB
testcase_12 AC 291 ms
92,500 KB
testcase_13 AC 286 ms
92,468 KB
testcase_14 AC 864 ms
100,044 KB
testcase_15 AC 222 ms
89,500 KB
testcase_16 TLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#yukicoder393F

'''
aftercontest これ解けそう
N^2 * logN が間に合うだろ

えー TLE すいません

角度でソートしなかったため たいへんなことに
'''
from fractions import Fraction as Fc
f=lambda:tuple(map(int,input().split()))

#直線の切片のx座標y座標を返す 予定でしたが多倍長整数で死
def line(P,Q):
    x1,y1=P; x2,y2=Q
    if x1==x2: return (x1,10**100)
    R=Fc(y2-y1,x2-x1); return (R,-R*x1+y1)

N=int(input()); P=[f() for _ in range(N)]; ans=0

#直線でやるとたいへんなことになってしまいます 偏角ソートで
for now in range(N):
    D=set()
    for next in range(N):
        if now==next: continue
        x,y=P[next][0]-P[now][0],P[next][1]-P[now][1]
        R,check=(Fc(y,x),x<0) if x!=0 else (Fc(1,3*10**18),y<0)
        if (R,check) not in D: D.add((R,check))
        else: break
    else: continue
    ans+=1
print(ans)
0