結果
| 問題 |
No.754 畳み込みの和
|
| コンテスト | |
| ユーザー |
🍮かんプリン
|
| 提出日時 | 2019-02-23 22:42:51 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 576 bytes |
| コンパイル時間 | 1,283 ms |
| コンパイル使用メモリ | 158,324 KB |
| 実行使用メモリ | 18,376 KB |
| 最終ジャッジ日時 | 2024-12-14 16:42:48 |
| 合計ジャッジ時間 | 25,819 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 3 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
int gcd(int a,int b){return b?gcd(b,a%b):a;}
#define MOD 1000000007
ll a[100001],b[100001];
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
ll c=0,d=0;
cin >> n;
rep(i,n+1) {
cin >> a[i];
}
rep(i,n+1) {
cin >> b[i];
}
rep(i,n+1) {
rep(j,n-i+1) {
d+=b[j]%MOD;
d%=MOD;
}
c+=a[i]*d%MOD;
c%=MOD;
}
cout << c << endl;
return 0;
}
🍮かんプリン