結果

問題 No.2517 Right Triangles on Circle
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-11-08 04:59:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 247 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 451 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 167,992 KB
最終ジャッジ日時 2023-11-08 04:59:45
合計ジャッジ時間 7,749 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
55,724 KB
testcase_01 AC 46 ms
55,724 KB
testcase_02 AC 44 ms
55,724 KB
testcase_03 AC 45 ms
55,724 KB
testcase_04 AC 44 ms
55,724 KB
testcase_05 AC 45 ms
55,724 KB
testcase_06 AC 45 ms
55,724 KB
testcase_07 AC 47 ms
55,724 KB
testcase_08 AC 45 ms
55,724 KB
testcase_09 AC 46 ms
55,724 KB
testcase_10 AC 44 ms
55,724 KB
testcase_11 AC 45 ms
55,724 KB
testcase_12 AC 44 ms
55,724 KB
testcase_13 AC 224 ms
160,852 KB
testcase_14 AC 206 ms
160,928 KB
testcase_15 AC 247 ms
167,652 KB
testcase_16 AC 241 ms
167,992 KB
testcase_17 AC 195 ms
117,260 KB
testcase_18 AC 177 ms
144,728 KB
testcase_19 AC 156 ms
135,008 KB
testcase_20 AC 167 ms
135,376 KB
testcase_21 AC 226 ms
161,332 KB
testcase_22 AC 88 ms
94,368 KB
testcase_23 AC 173 ms
112,800 KB
testcase_24 AC 104 ms
100,648 KB
testcase_25 AC 80 ms
87,008 KB
testcase_26 AC 206 ms
146,408 KB
testcase_27 AC 84 ms
91,760 KB
testcase_28 AC 71 ms
78,220 KB
testcase_29 AC 103 ms
100,472 KB
testcase_30 AC 80 ms
86,792 KB
testcase_31 AC 175 ms
114,448 KB
権限があれば一括ダウンロードができます

ソースコード

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