結果
| 問題 | No.909 たぴの配置 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-10-18 21:31:02 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 53 ms / 3,000 ms |
| コード長 | 661 bytes |
| コンパイル時間 | 1,705 ms |
| コンパイル使用メモリ | 168,000 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-25 14:59:53 |
| 合計ジャッジ時間 | 4,428 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define all(x) begin(x), end(x)
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using vi = vector<int>;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
int n;
cin >> n;
vi a(n), b(n);
for (auto& x : a)
cin >> x;
for (auto& x : b)
cin >> x;
int ans = 1e9 + 7;
for (int i = 0; i < n; ++i) {
ans = min(ans, a[i] + b[i]);
}
cout << ans << '\n';
cout << 0 << '\n';
for (int i = 0; i < n; ++i) {
cout << min(a[i], ans) << '\n';
}
cout << ans << '\n';
return 0;
}