結果

問題 No.723 2つの数の和
コンテスト
ユーザー iastm
提出日時 2025-10-11 15:49:42
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 1,883 ms
コンパイル使用メモリ 130,756 KB
実行使用メモリ 11,544 KB
最終ジャッジ日時 2025-10-11 15:49:48
合計ジャッジ時間 5,079 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <atcoder/convolution>

using ll = long long;

int main() {
    int N, X;
    std::cin >> N >> X;
    if (X >= 200000) {
        std::cout << 0 << std::endl;
        return 0;
    }
    std::vector<ll> fps(100001);
    while (N--) {
        int a;
        std::cin >> a;
        fps[a]++;
    }
    fps = atcoder::convolution_ll(fps, fps);
    std::cout << fps[X] << std::endl;
}
0