結果

問題 No.2517 Right Triangles on Circle
ユーザー FromBooskaFromBooska
提出日時 2023-10-27 21:49:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 219 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 81,864 KB
実行使用メモリ 170,616 KB
最終ジャッジ日時 2023-10-27 21:49:59
合計ジャッジ時間 4,770 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,432 KB
testcase_01 AC 36 ms
53,432 KB
testcase_02 AC 35 ms
53,432 KB
testcase_03 AC 36 ms
53,432 KB
testcase_04 AC 36 ms
53,432 KB
testcase_05 AC 35 ms
53,432 KB
testcase_06 AC 34 ms
53,432 KB
testcase_07 AC 35 ms
53,432 KB
testcase_08 AC 34 ms
53,432 KB
testcase_09 AC 35 ms
53,432 KB
testcase_10 AC 34 ms
53,432 KB
testcase_11 AC 38 ms
53,432 KB
testcase_12 AC 35 ms
53,432 KB
testcase_13 AC 195 ms
160,528 KB
testcase_14 AC 192 ms
160,716 KB
testcase_15 AC 219 ms
170,552 KB
testcase_16 AC 218 ms
170,616 KB
testcase_17 AC 178 ms
118,216 KB
testcase_18 AC 174 ms
112,820 KB
testcase_19 AC 146 ms
137,716 KB
testcase_20 AC 156 ms
139,024 KB
testcase_21 AC 216 ms
165,168 KB
testcase_22 AC 81 ms
93,536 KB
testcase_23 AC 176 ms
136,720 KB
testcase_24 AC 96 ms
100,128 KB
testcase_25 AC 69 ms
87,956 KB
testcase_26 AC 204 ms
148,484 KB
testcase_27 AC 76 ms
90,748 KB
testcase_28 AC 62 ms
76,556 KB
testcase_29 AC 90 ms
99,852 KB
testcase_30 AC 71 ms
85,380 KB
testcase_31 AC 175 ms
137,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# 直径が何個あるか
# M%2=1なら0

N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
A_set = set(A)
if M%2 == 1:
    print(0)
else:
    ans = 0
    for a in A:
        if a+M//2 in A_set:
            ans += N-2
    print(ans)
0