結果

問題 No.2517 Right Triangles on Circle
ユーザー titiatitia
提出日時 2023-10-27 21:57:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 423 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 360 ms
コンパイル使用メモリ 11,708 KB
実行使用メモリ 44,748 KB
最終ジャッジ日時 2023-10-27 21:57:18
合計ジャッジ時間 6,940 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
9,944 KB
testcase_01 AC 29 ms
9,944 KB
testcase_02 AC 29 ms
9,944 KB
testcase_03 AC 29 ms
9,944 KB
testcase_04 AC 28 ms
9,944 KB
testcase_05 AC 29 ms
9,948 KB
testcase_06 AC 28 ms
9,956 KB
testcase_07 AC 28 ms
10,012 KB
testcase_08 AC 28 ms
10,016 KB
testcase_09 AC 29 ms
9,952 KB
testcase_10 AC 29 ms
9,964 KB
testcase_11 AC 28 ms
9,948 KB
testcase_12 AC 28 ms
10,008 KB
testcase_13 AC 389 ms
44,624 KB
testcase_14 AC 303 ms
44,624 KB
testcase_15 AC 423 ms
42,820 KB
testcase_16 AC 418 ms
42,820 KB
testcase_17 AC 320 ms
38,488 KB
testcase_18 AC 294 ms
36,760 KB
testcase_19 AC 264 ms
34,104 KB
testcase_20 AC 265 ms
33,852 KB
testcase_21 AC 377 ms
44,748 KB
testcase_22 AC 95 ms
22,036 KB
testcase_23 AC 300 ms
33,468 KB
testcase_24 AC 139 ms
22,212 KB
testcase_25 AC 81 ms
17,284 KB
testcase_26 AC 327 ms
38,344 KB
testcase_27 AC 88 ms
18,080 KB
testcase_28 AC 69 ms
15,948 KB
testcase_29 AC 137 ms
22,708 KB
testcase_30 AC 87 ms
16,536 KB
testcase_31 AC 295 ms
35,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N,M=map(int,input().split())
A=list(map(int,input().split()))

A.sort()
S=set(A)
ANS=0

for a in A:
    if M%2==0 and a+M//2 in S:
        ANS+=N-2

print(ANS)
0