結果

問題 No.723 2つの数の和
ユーザー bluebery1001bluebery1001
提出日時 2024-02-20 13:03:18
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 294 bytes
コンパイル時間 3,866 ms
コンパイル使用メモリ 278,064 KB
実行使用メモリ 433,984 KB
最終ジャッジ日時 2024-02-20 13:04:43
合計ジャッジ時間 8,470 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 1 ms
6,676 KB
testcase_03 AC 60 ms
7,808 KB
testcase_04 AC 183 ms
15,216 KB
testcase_05 AC 193 ms
19,464 KB
testcase_06 AC 67 ms
8,264 KB
testcase_07 AC 48 ms
6,676 KB
testcase_08 AC 53 ms
7,752 KB
testcase_09 AC 47 ms
6,676 KB
testcase_10 AC 97 ms
13,800 KB
testcase_11 AC 44 ms
8,116 KB
testcase_12 AC 35 ms
6,676 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 AC 16 ms
6,676 KB
testcase_19 AC 202 ms
21,616 KB
testcase_20 AC 2 ms
6,676 KB
testcase_21 AC 2 ms
6,676 KB
testcase_22 AC 2 ms
6,676 KB
testcase_23 AC 112 ms
12,576 KB
testcase_24 AC 178 ms
20,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#include<atcoder/convolution>
using namespace atcoder;
typedef long long ll;
int main(){
	ll n,x;cin >> n >> x;
	vector<ll>cnt(x+1);
	for(;n--;){
		ll a;cin >> a;
		if(a<=x)cnt[a]++;
	}
	auto ret = convolution_ll(cnt,cnt);
	cout << ret[x] << endl;
}
0