結果

問題 No.723 2つの数の和
ユーザー focus
提出日時 2018-08-12 16:14:39
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 331 bytes
コンパイル時間 514 ms
コンパイル使用メモリ 65,060 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-24 07:21:24
合計ジャッジ時間 1,909 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using ll = long long;
using namespace std;
int main(){
    ll a[101010]={},b[101010]={},n,x,ans=0;
    cin >> n >> x;
    for(ll i=0;i<n;i++){
            cin >> a[i];
            b[a[i]]++;
    }
    for(ll i=0;i<n;i++){
        if(x-a[i]<=100000)  ans+=b[x-a[i]];
    }
    cout << ans << endl;
    return 0;
}
0