結果

問題 No.2517 Right Triangles on Circle
ユーザー iris2617
提出日時 2025-03-17 02:23:41
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 347 ms / 2,000 ms
コード長 479 bytes
コンパイル時間 2,174 ms
コンパイル使用メモリ 196,728 KB
実行使用メモリ 17,792 KB
最終ジャッジ日時 2025-03-17 02:23:50
合計ジャッジ時間 8,564 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define int long long
#define matsuri pair<int,int>
//const int iris = 1e9+7;
const int iris = 998244353;
using namespace std;

void solve()
{
	int n,m;
	cin>>n>>m;
	set<int> s;
	for(int i=0;i<n;i++)
	{
		int a;
		cin>>a;
		s.insert(a);
	}
	int ans=0;
	for(int x:s)
		if(m%2==0 && x<=m/2 && s.count(x+m/2))
			ans+=n-2;
	cout<<ans<<'\n';
}

signed main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);

	int T=1;
	//cin>>T;
	while(T--)
		solve();

	return 0;
}
0