結果

問題 No.2355 Unhappy Back Dance
ユーザー 👑 timitimi
提出日時 2023-06-22 15:11:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,528 ms / 6,000 ms
コード長 534 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 87,124 KB
実行使用メモリ 81,236 KB
最終ジャッジ日時 2023-09-12 09:38:34
合計ジャッジ時間 24,630 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,164 KB
testcase_01 AC 75 ms
71,560 KB
testcase_02 AC 76 ms
71,500 KB
testcase_03 AC 76 ms
71,448 KB
testcase_04 AC 76 ms
71,412 KB
testcase_05 AC 75 ms
71,404 KB
testcase_06 AC 232 ms
77,736 KB
testcase_07 AC 233 ms
77,988 KB
testcase_08 AC 384 ms
78,412 KB
testcase_09 AC 383 ms
78,544 KB
testcase_10 AC 444 ms
78,864 KB
testcase_11 AC 457 ms
79,348 KB
testcase_12 AC 388 ms
78,676 KB
testcase_13 AC 389 ms
78,548 KB
testcase_14 AC 475 ms
79,564 KB
testcase_15 AC 74 ms
71,144 KB
testcase_16 AC 1,526 ms
81,024 KB
testcase_17 AC 1,522 ms
80,688 KB
testcase_18 AC 1,528 ms
81,196 KB
testcase_19 AC 1,518 ms
81,236 KB
testcase_20 AC 1,524 ms
80,596 KB
testcase_21 AC 692 ms
78,260 KB
testcase_22 AC 213 ms
77,444 KB
testcase_23 AC 219 ms
77,388 KB
testcase_24 AC 1,389 ms
80,268 KB
testcase_25 AC 795 ms
78,620 KB
testcase_26 AC 800 ms
78,868 KB
testcase_27 AC 693 ms
78,176 KB
testcase_28 AC 107 ms
76,932 KB
testcase_29 AC 131 ms
77,612 KB
testcase_30 AC 1,278 ms
79,948 KB
testcase_31 AC 965 ms
79,076 KB
testcase_32 AC 183 ms
77,488 KB
testcase_33 AC 590 ms
77,792 KB
testcase_34 AC 96 ms
76,736 KB
testcase_35 AC 108 ms
76,816 KB
testcase_36 AC 694 ms
78,224 KB
testcase_37 AC 427 ms
77,676 KB
testcase_38 AC 497 ms
77,836 KB
testcase_39 AC 413 ms
77,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=[]
for _ in range(N):
  x,y=map(int, input().split())
  A.append((x,y))
  
import math
ans=0
for i in range(N):
  ax,ay=A[i]
  D=[]
  for j in range(N):
    if i==j:
      continue
    bx,by=A[j]
    x,y=bx-ax,by-ay
    if x==0 and y>0:
    	D.append((0,1))
    elif x==0 and y<0:
    	D.append((0,-1))
    elif x>0 and y==0:
    	D.append((1,0))
    elif x<0 and y==0:
    	D.append((-1,0))
    else:
    	d=math.gcd(abs(x),abs(y))
    	x//=d;y//=d
    	D.append((x,y))
  if len(D)!=len(set(D)):
  	ans+=1
print(ans)
0