結果
| 問題 |
No.754 畳み込みの和
|
| コンテスト | |
| ユーザー |
pyttkn
|
| 提出日時 | 2018-12-06 00:23:58 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 689 bytes |
| コンパイル時間 | 791 ms |
| コンパイル使用メモリ | 85,660 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-22 11:32:35 |
| 合計ジャッジ時間 | 16,610 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
ソースコード
#define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<iomanip>
#include<cassert>
#include<functional>
int main(){
std::ios::sync_with_stdio(false);
std::cin.tie(0);
const int subtract = 1000000007;
int n;
long long ans = 0;
std::cin >> n;
std::vector<int> a(n + 1);
std::vector<int> b(n + 1);
for (int i = 0; i < n + 1; i++){
std::cin >> a[i];
}
for (int i = 0; i < n + 1; i++){
std::cin >> b[i];
}
//入力終わり
for (int i = 0; i < n + 1; i++){
for (int j = 0; j < n + 1 - i; j++){
ans += static_cast<long long>(a[i] * b[j]);
}
}
std::cout << ans % subtract << '\n';
return 0;
}
pyttkn