結果

問題 No.2517 Right Triangles on Circle
ユーザー ntudantuda
提出日時 2023-10-28 11:08:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 170 ms / 2,000 ms
コード長 216 bytes
コンパイル時間 437 ms
コンパイル使用メモリ 81,856 KB
実行使用メモリ 167,952 KB
最終ジャッジ日時 2023-10-28 11:08:56
合計ジャッジ時間 4,902 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,576 KB
testcase_01 AC 35 ms
53,576 KB
testcase_02 AC 33 ms
53,576 KB
testcase_03 AC 33 ms
53,576 KB
testcase_04 AC 52 ms
53,576 KB
testcase_05 AC 34 ms
53,576 KB
testcase_06 AC 34 ms
53,576 KB
testcase_07 AC 33 ms
53,576 KB
testcase_08 AC 34 ms
53,576 KB
testcase_09 AC 34 ms
53,576 KB
testcase_10 AC 35 ms
53,576 KB
testcase_11 AC 33 ms
53,576 KB
testcase_12 AC 33 ms
53,576 KB
testcase_13 AC 164 ms
158,460 KB
testcase_14 AC 104 ms
109,816 KB
testcase_15 AC 168 ms
167,888 KB
testcase_16 AC 166 ms
167,952 KB
testcase_17 AC 133 ms
116,700 KB
testcase_18 AC 151 ms
111,476 KB
testcase_19 AC 115 ms
135,772 KB
testcase_20 AC 117 ms
136,332 KB
testcase_21 AC 170 ms
162,376 KB
testcase_22 AC 54 ms
78,468 KB
testcase_23 AC 134 ms
135,448 KB
testcase_24 AC 81 ms
99,660 KB
testcase_25 AC 51 ms
75,432 KB
testcase_26 AC 151 ms
146,628 KB
testcase_27 AC 51 ms
76,916 KB
testcase_28 AC 54 ms
76,512 KB
testcase_29 AC 99 ms
99,396 KB
testcase_30 AC 61 ms
85,276 KB
testcase_31 AC 136 ms
135,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
A = list(map(int, input().split()))
if M & 1:
    print(0)
    exit()
SA = set(A)
MH = M // 2
cnt = 0
for i in range(N):
    if A[i] + MH in SA:
        cnt += 1
print(cnt * (N - 2))
0