結果

問題 No.754 畳み込みの和
ユーザー 夕叢霧香(ゆうむらきりか)夕叢霧香(ゆうむらきりか)
提出日時 2018-12-02 11:44:20
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 484 bytes
コンパイル時間 582 ms
コンパイル使用メモリ 74,936 KB
実行使用メモリ 5,024 KB
最終ジャッジ日時 2023-09-10 23:46:37
合計ジャッジ時間 2,121 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<algorithm>
#include<iostream>
#include<vector>
using namespace std;
typedef long long lint;
typedef vector<int>vi;
typedef pair<int,int>pii;
#define rep(i,n)for(int i=0;i<(int)(n);++i)

const int N=110000;
lint a[N],b[N];
const lint mo=1000000007;
int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin>>n;
  rep(i,n+1)cin>>a[i];
  rep(i,n+1)cin>>b[i];
  rep(i,N-1)b[i+1]=(b[i]+b[i+1])%mo;
  lint c=0;
  rep(i,N)c=(c+a[i]*b[n-i])%mo;
  cout<<c<<endl;
}
0