結果
| 問題 |
No.909 たぴの配置
|
| コンテスト | |
| ユーザー |
mine691
|
| 提出日時 | 2019-10-18 22:04:36 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 384 ms / 3,000 ms |
| コード長 | 720 bytes |
| コンパイル時間 | 1,691 ms |
| コンパイル使用メモリ | 168,128 KB |
| 実行使用メモリ | 5,632 KB |
| 最終ジャッジ日時 | 2024-06-25 17:00:06 |
| 合計ジャッジ時間 | 7,968 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 1e9 + 7;
const int inf = (1 << 30) - 1;
const ll infll = (1LL << 61) - 1;
#define fast() ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
int N, ans = inf;
int main()
{
cin >> N;
vector<int> x(N), y(N), point(N + 2);
for (int i = 0; i < N; i++)
{
cin >> x[i];
}
for (int i = 0; i < N; i++)
{
cin >> y[i];
ans = min(ans, x[i] + y[i]);
}
cout << ans << endl;
point[0] = 0, point[N + 1] = ans;
for (int i = 1; i < N + 1; i++)
{
point[i] = min(x[i - 1], ans);
}
for (int i = 0; i < N + 2; i++)
{
cout << point[i] << endl;
}
}
mine691