結果
問題 | No.2355 Unhappy Back Dance |
ユーザー | navel_tos |
提出日時 | 2023-06-17 00:29:24 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,144 bytes |
コンパイル時間 | 293 ms |
コンパイル使用メモリ | 87,352 KB |
実行使用メモリ | 270,268 KB |
最終ジャッジ日時 | 2023-09-06 23:33:29 |
合計ジャッジ時間 | 38,701 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 219 ms
89,836 KB |
testcase_01 | AC | 218 ms
89,832 KB |
testcase_02 | AC | 225 ms
89,872 KB |
testcase_03 | AC | 227 ms
89,744 KB |
testcase_04 | AC | 227 ms
89,704 KB |
testcase_05 | AC | 223 ms
89,704 KB |
testcase_06 | AC | 508 ms
91,968 KB |
testcase_07 | AC | 2,539 ms
96,072 KB |
testcase_08 | AC | 2,646 ms
97,364 KB |
testcase_09 | AC | 2,641 ms
97,096 KB |
testcase_10 | AC | 4,034 ms
209,312 KB |
testcase_11 | AC | 4,713 ms
236,228 KB |
testcase_12 | AC | 2,722 ms
97,864 KB |
testcase_13 | AC | 2,649 ms
98,040 KB |
testcase_14 | AC | 5,354 ms
246,240 KB |
testcase_15 | AC | 227 ms
89,736 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 | -- | - |
ソースコード
#yukicoder393F ''' aftercontest これ解けそう N^2 * logN が間に合うだろ ''' from fractions import Fraction as Fc from collections import defaultdict as dd 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 i in range(N): D=dd(list); hantei=0 for j in range(N): if i==j: continue D[line(P[i],P[j])].append(j) for k in D: if len(D[k])==1: continue if k[1]==10**100: plus,minus=0,0 for now in D[k]: if P[i][1]<P[now][1] and not plus: plus=1 elif P[i][1]>P[now][1] and not minus: minus=1 else: hantei=1; break else: plus,minus=0,0 for now in D[k]: if P[i][0]<P[now][0] and not plus: plus=1 elif P[i][0]>P[now][0] and not minus: minus=1 else: hantei=1; break ans+=hantei print(ans)