結果

問題 No.2517 Right Triangles on Circle
コンテスト
ユーザー hiro1729
提出日時 2023-10-27 21:25:59
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 177 ms / 2,000 ms
+ 611µs
コード長 239 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 259 ms
コンパイル使用メモリ 95,948 KB
実行使用メモリ 179,836 KB
最終ジャッジ日時 2026-09-04 03:30:16
合計ジャッジ時間 6,578 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from collections import defaultdict
n, m = map(int, input().split())
if m % 2 == 1:
	print(0)
	exit()
m //= 2
a = list(map(int, input().split()))
s = set()
for i in a:
	s.add(i)
ans = 0
for i in a:
	if m + i in s:
		ans += n - 2
print(ans)
0