結果
問題 | No.2769 Number of Rhombi |
ユーザー |
![]() |
提出日時 | 2024-05-31 22:27:25 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 677 bytes |
コンパイル時間 | 455 ms |
コンパイル使用メモリ | 82,196 KB |
実行使用メモリ | 84,428 KB |
最終ジャッジ日時 | 2024-05-31 22:27:33 |
合計ジャッジ時間 | 7,626 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 40 ms
57,856 KB |
testcase_01 | AC | 40 ms
51,968 KB |
testcase_02 | AC | 48 ms
59,136 KB |
testcase_03 | TLE | - |
testcase_04 | -- | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
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 | -- | - |
ソースコード
n = int(input()) xy = [tuple(map(int,input().split())) for _ in range(n)] s = set(xy); c = 0 for i in range(n-2): xi,yi = xy[i] for j in range(i+1,n-1): xj,yj = xy[j] for k in range(j+1,n): xk,yk = xy[k] t = {xy[i],xy[j],xy[k]} if (xi-xk)**2+(yi-yk)**2==(xj-xk)**2+(yj-yk)**2 and (xi+xj-xk,yi+yj-yk) in s and (xi+xj-xk,yi+yj-yk) not in t: c += 1 if (xj-xi)**2+(yj-yi)**2==(xk-xi)**2+(yk-yi)**2 and (xj+xk-xi,yj+yk-yi) in s and (xj+xk-xi,yj+yk-yi) not in t: c += 1 if (xk-xj)**2+(yk-yj)**2==(xi-xj)**2+(yi-yj)**2 and (xk+xi-xj,yk+yi-yj) in s and (xk+xi-xj,yk+yi-yj) not in t: c += 1 print(c//4)