結果

問題 No.723 2つの数の和
ユーザー kusshi
提出日時 2019-11-16 15:22:57
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 350 bytes
コンパイル時間 1,174 ms
コンパイル使用メモリ 160,584 KB
実行使用メモリ 13,888 KB
最終ジャッジ日時 2024-09-24 16:08:38
合計ジャッジ時間 4,651 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other TLE * 1 -- * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;

int main(){
    int n, x, ans = 0;
    cin >> n >> x;
    vector<int> a(n);
    rep(i,n)    cin >> a.at(i);
    rep(i,n)rep(j,n){
        if(a.at(i)+a.at(j) == x)
            ++ans;
    }

    cout << ans << endl;
    
    return 0;
}
0