結果

問題 No.909 たぴの配置
ユーザー xuzijian629
提出日時 2019-10-18 21:32:41
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 277 ms / 3,000 ms
コード長 514 bytes
コンパイル時間 1,863 ms
コンパイル使用メモリ 193,720 KB
最終ジャッジ日時 2025-01-07 22:41:34
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n;
    cin >> n;

    vector<int> xs(n), ys(n);
    for (int i = 0; i < n; i++) cin >> xs[i];
    for (int i = 0; i < n; i++) cin >> ys[i];

    int nin = 1e9;
    for (int i = 0; i < n; i++) {
        nin = min(nin, xs[i] + ys[i]);
    }

    cout << nin << endl;
    cout << 0 << endl;
    for (int i = 0; i < n; i++) {
        cout << min(nin, xs[i]) << endl;
    }
    cout << nin << endl;
}
0