結果
| 問題 |
No.754 畳み込みの和
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-12-02 08:00:50 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 470 bytes |
| コンパイル時間 | 438 ms |
| コンパイル使用メモリ | 60,112 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-28 02:31:45 |
| 合計ジャッジ時間 | 1,216 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
int n;
cin >> n;
n++;
long a_sum = 0;
long a_sums[n];
for(int i = 0; i < n; i++){
long a;
cin >> a;
a_sum += a;
a_sums[i] = a_sum;
}
long ans = 0;
for(int i = 0; i < n; i++){
int b;
cin >> b;
ans += a_sums[n - i - 1] * b;
ans %= long(1e9 + 7);
}
cout << ans << endl;
}