結果
| 問題 |
No.909 たぴの配置
|
| コンテスト | |
| ユーザー |
a01sa01to
|
| 提出日時 | 2025-07-21 00:44:41 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 51 ms / 3,000 ms |
| コード長 | 516 bytes |
| コンパイル時間 | 3,041 ms |
| コンパイル使用メモリ | 278,696 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-07-21 00:44:48 |
| 合計ジャッジ時間 | 6,981 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
int n;
cin >> n;
vector<ll> x(n), y(n);
rep(i, n) cin >> x[i];
rep(i, n) cin >> y[i];
ll ans = 1e18;
rep(i, n) ans = min(ans, x[i] + y[i]);
cout << ans << '\n';
cout << 0 << '\n';
rep(i, n) cout << clamp(x[i], max(0LL, ans - y[i]), ans + y[i]) << '\n';
cout << ans << '\n';
return 0;
}
a01sa01to