結果

問題 No.723 2つの数の和
コンテスト
ユーザー vjudge1
提出日時 2026-06-08 03:43:28
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
TLE  
実行時間 -
コード長 432 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,582 ms
コンパイル使用メモリ 178,848 KB
実行使用メモリ 11,100 KB
最終ジャッジ日時 2026-06-08 03:44:19
合計ジャッジ時間 10,757 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other TLE * 1 -- * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<bits/stdc++.h>

using namespace std;

#define int long long

int32_t main(){
    int n, x, c = 0;
    cin >> n >> x;
    vector<int> A;
    for(int i = 0; i < n; i++){
        int a;
        cin >> a;
        A.push_back(a);
    }
    for(int i = 0; i < n; i++){
        for(int j = 0; j < n; j++){
            if(A[i] + A[j] == x){
                c++;
            }
        }
    }
    cout << c << endl;
    return 0;

}
0