結果
| 問題 | 
                            No.723 2つの数の和
                             | 
                    
| コンテスト | |
| ユーザー | 
                             focus
                         | 
                    
| 提出日時 | 2018-08-12 16:10:38 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 323 bytes | 
| コンパイル時間 | 483 ms | 
| コンパイル使用メモリ | 64,360 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-24 07:21:17 | 
| 合計ジャッジ時間 | 1,820 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 17 WA * 5 | 
ソースコード
#include<iostream>
using ll = long long;
using namespace std;
int main(){
    ll a[100001]={},b[100001]={},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;
    return 0;
}
            
            
            
        
            
focus