結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
55,684 KB
testcase_01 AC 42 ms
55,684 KB
testcase_02 AC 35 ms
55,684 KB
testcase_03 AC 35 ms
55,684 KB
testcase_04 AC 35 ms
55,684 KB
testcase_05 AC 37 ms
55,684 KB
testcase_06 AC 35 ms
55,684 KB
testcase_07 AC 34 ms
55,684 KB
testcase_08 AC 35 ms
55,684 KB
testcase_09 AC 34 ms
55,684 KB
testcase_10 AC 46 ms
55,684 KB
testcase_11 AC 47 ms
55,684 KB
testcase_12 AC 37 ms
55,684 KB
testcase_13 WA -
testcase_14 AC 146 ms
163,616 KB
testcase_15 AC 154 ms
170,020 KB
testcase_16 AC 151 ms
169,916 KB
testcase_17 AC 132 ms
141,932 KB
testcase_18 AC 126 ms
135,420 KB
testcase_19 AC 110 ms
110,672 KB
testcase_20 AC 127 ms
110,640 KB
testcase_21 AC 180 ms
164,620 KB
testcase_22 AC 71 ms
97,108 KB
testcase_23 AC 126 ms
135,900 KB
testcase_24 AC 88 ms
100,880 KB
testcase_25 AC 65 ms
89,560 KB
testcase_26 AC 153 ms
149,292 KB
testcase_27 AC 68 ms
94,260 KB
testcase_28 AC 52 ms
78,192 KB
testcase_29 AC 75 ms
100,676 KB
testcase_30 AC 61 ms
86,964 KB
testcase_31 AC 122 ms
139,004 KB
権限があれば一括ダウンロードができます

ソースコード

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