結果

問題 No.2517 Right Triangles on Circle
ユーザー flygon
提出日時 2023-10-27 21:28:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 425 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 82,272 KB
実行使用メモリ 170,032 KB
最終ジャッジ日時 2024-09-25 13:30:08
合計ジャッジ時間 4,597 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(5*10**5)
input = sys.stdin.readline
from collections import defaultdict, deque, Counter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right
from math import gcd

n,m = map(int,input().split())
a = list(map(int,input().split()))

s = set()
ans = 0
for i in range(n):
    op = (a[i]+(m//2)) % m
    if op in s:
        ans += n-2
    s.add(a[i])
print(ans*(m%2==0))
0