結果

問題 No.2517 Right Triangles on Circle
ユーザー Navier_Boltzmann
提出日時 2023-11-08 04:59:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 252 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 232 ms
コンパイル使用メモリ 82,224 KB
実行使用メモリ 168,080 KB
最終ジャッジ日時 2024-09-25 23:36:54
合計ジャッジ時間 5,875 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from functools import *
from itertools import *
from heapq import *
import sys,math
input = sys.stdin.buffer.readline

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

A.sort()
ans = 0
SA = set(A)
if M%2:
    print(0)
    exit()
for a in A:
    
    if a + M//2 in SA:
        ans += N-2
print(ans)
    
0