結果
問題 | No.2517 Right Triangles on Circle |
ユーザー |
![]() |
提出日時 | 2023-10-27 21:34:46 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 270 bytes |
コンパイル時間 | 153 ms |
コンパイル使用メモリ | 82,284 KB |
実行使用メモリ | 848,572 KB |
最終ジャッジ日時 | 2024-09-25 13:39:30 |
合計ジャッジ時間 | 5,824 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 RE * 7 MLE * 1 -- * 3 |
ソースコード
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]]+=1if M%2!=0:print(0)exit()ans=0for i in range(1,M//2+1):j=i+M//2ans+=flag[i]*flag[j]*(N-flag[i]-flag[j])print(ans)