結果
| 問題 |
No.723 2つの数の和
|
| コンテスト | |
| ユーザー |
bluebery1001
|
| 提出日時 | 2024-02-20 13:06:27 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 197 ms / 2,000 ms |
| コード長 | 342 bytes |
| コンパイル時間 | 4,254 ms |
| コンパイル使用メモリ | 278,192 KB |
| 実行使用メモリ | 21,360 KB |
| 最終ジャッジ日時 | 2024-09-29 03:42:37 |
| 合計ジャッジ時間 | 6,503 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#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;
if(x>1000000){
cout<<0<<endl;
return 0;
}
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;
}
bluebery1001