結果
問題 | No.909 たぴの配置 |
ユーザー |
![]() |
提出日時 | 2020-04-29 21:08:08 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 57 ms / 3,000 ms |
コード長 | 459 bytes |
コンパイル時間 | 1,592 ms |
コンパイル使用メモリ | 169,148 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-29 22:44:05 |
合計ジャッジ時間 | 4,470 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h>#define rep(i,n) for(int i=(0);i<(n);i++)using namespace std;typedef long long ll;typedef pair<ll, ll> pll;int main(){cin.tie(0);ios::sync_with_stdio(false);int n;cin >> n;vector<int> x(n), y(n);rep(i, n) cin >> x[i];rep(i, n) cin >> y[i];int mn = 1e9;rep(i, n) mn = min(mn, x[i] + y[i]);cout << mn << "\n";cout << 0 << "\n";rep(i, n){cout << max(mn - y[i], 0) << "\n";}cout << mn << "\n";}