結果
問題 |
No.2517 Right Triangles on Circle
|
ユーザー |
|
提出日時 | 2023-10-27 21:37:23 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 356 bytes |
コンパイル時間 | 2,114 ms |
コンパイル使用メモリ | 197,920 KB |
最終ジャッジ日時 | 2025-02-17 14:41:47 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 20 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll=long long; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N,M; cin>>N>>M; if(M%2){ puts("0"); return 0; } set<int>A; ll ans=0; for(int i=0;i<N;i++){ int t; cin>>t; if(A.count(t-M/2)){ ans+=N-2; } A.insert(t); } cout<<ans<<'\n'; }