結果
| 問題 |
No.754 畳み込みの和
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-08 17:34:16 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,480 bytes |
| コンパイル時間 | 3,930 ms |
| コンパイル使用メモリ | 229,184 KB |
| 実行使用メモリ | 13,256 KB |
| 最終ジャッジ日時 | 2024-11-24 12:03:38 |
| 合計ジャッジ時間 | 5,028 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
// clang-format off
#define REP(i, n) for(int i = 0; i < (n); i++) // [0, n): 0, 1,... ,n-1
#define rep(i, l, r) for(int i = l; i < (r); i++) // [l, r): l, l+1,... ,r-1
#define rrep(i, r, l) for(int i = r; i >= (l); i--) // [l, r]: r, r-1,... ,l
#define ALL(v) (v).begin(), (v).end()
#define endl "\n"
using ll = long long;
using P = pair<ll, ll>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
istream& operator>>(istream& is, vl& vec) {for(auto& e: vec)is>>e; return (is);}
constexpr ll INF = 1e18;
template <class T> bool chmax(T &a, const T &b) {if(a < b) {a = b;return true;}return false;}
template <class T> bool chmin(T &a, const T &b) {if (b < a) {a = b;return true;}return false;}
ll ceil_div(ll a, ll b){ return (a >= 0 ? (a + (b - 1)) / b : (a - (b - 1)) / b); }
/* Mod Int from atcoder library */
using mint = atcoder::modint1000000007;
// using mint = atcoder::modint998244353;
istream& operator>>(istream& is, mint& p) {long long t;is >> t;p = mint(t); return (is);}
ostream& operator<<(ostream& os, const mint& p) { return os << p.val(); }
// clang-format on
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(15);
ll n;cin>>n;
vl a(n+1), b(n+1);
cin >> a;cin>>b;
auto c= atcoder::convolution_ll(a,b);
mint ans=0;
REP(i,n+1)ans+=c[i];
cout << ans << endl;
return 0;
}