結果

問題 No.2517 Right Triangles on Circle
ユーザー yu_w(ゆ)yu_w(ゆ)
提出日時 2023-10-27 21:34:46
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 270 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 81,860 KB
実行使用メモリ 844,924 KB
最終ジャッジ日時 2023-10-27 21:34:55
合計ジャッジ時間 5,851 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,520 KB
testcase_01 AC 33 ms
53,520 KB
testcase_02 AC 32 ms
53,520 KB
testcase_03 AC 31 ms
53,520 KB
testcase_04 AC 32 ms
53,520 KB
testcase_05 AC 31 ms
53,520 KB
testcase_06 AC 30 ms
53,520 KB
testcase_07 AC 30 ms
53,520 KB
testcase_08 AC 33 ms
53,520 KB
testcase_09 AC 30 ms
53,520 KB
testcase_10 AC 30 ms
53,520 KB
testcase_11 AC 31 ms
53,520 KB
testcase_12 AC 30 ms
53,520 KB
testcase_13 AC 103 ms
112,128 KB
testcase_14 AC 106 ms
111,976 KB
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 101 ms
127,392 KB
testcase_18 AC 96 ms
124,640 KB
testcase_19 AC 98 ms
114,816 KB
testcase_20 AC 91 ms
120,176 KB
testcase_21 AC 124 ms
136,876 KB
testcase_22 RE -
testcase_23 AC 646 ms
463,472 KB
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 MLE -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

flag=[0 for i in range(M+1)]
for i in range(N):
    flag[A[i]]+=1
    
if M%2!=0:
    print(0)
    exit()

ans=0
for i in range(1,M//2+1):
    j=i+M//2
    ans+=flag[i]*flag[j]*(N-flag[i]-flag[j])
print(ans)
0