結果
| 問題 | No.2517 Right Triangles on Circle |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-27 21:28:10 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 425 bytes |
| 記録 | |
| コンパイル時間 | 675 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 171,092 KB |
| 最終ジャッジ日時 | 2026-04-12 18:10:42 |
| 合計ジャッジ時間 | 8,188 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 WA * 1 |
ソースコード
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))