結果
| 問題 | No.1081 和の和 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-26 13:07:22 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 420 bytes |
| 記録 | |
| コンパイル時間 | 2,765 ms |
| コンパイル使用メモリ | 275,288 KB |
| 実行使用メモリ | 11,928 KB |
| 最終ジャッジ日時 | 2026-07-04 06:38:06 |
| 合計ジャッジ時間 | 3,651 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;
int main() {
int N;
cin >> N;
vector<ll> a(N + 1);
for (int i = 1; i <= N; i++) cin >> a[i];
for (int i = 1; i <= N - 1; i++) {
for (int j = 1; j <= (N - 1) - i + 1; j++) {
a[j] = (a[j] + a[j + 1]) % 1000000007;
}
}
cout << a[1] << endl;
return 0;
}