結果

問題 No.2517 Right Triangles on Circle
コンテスト
ユーザー hiro1729
提出日時 2023-10-27 21:25:59
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 239 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 122 ms
コンパイル使用メモリ 85,504 KB
実行使用メモリ 171,272 KB
最終ジャッジ日時 2026-04-12 18:07:00
合計ジャッジ時間 3,231 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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