結果

問題 No.909 たぴの配置
ユーザー rpy3cpp
提出日時 2019-10-18 21:29:04
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 49 ms / 3,000 ms
コード長 519 bytes
コンパイル時間 1,454 ms
コンパイル使用メモリ 169,176 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-25 14:56:53
合計ジャッジ時間 4,121 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    vector<int> Xs(N, 0);
    vector<int> Ys(N, 0);
    for (auto & x : Xs) cin >> x;
    for (auto & y : Ys) cin >> y;
    int res = 1e7;
    for (int i = 0; i < N; ++i){
        res = min(Xs[i] + Ys[i], res);
    }
    cout << res << '\n';
    cout << 0 << '\n';
    for (int i = 0; i < N; ++i){
        cout << min(Xs[i], res) << '\n';
    }
    cout << res << endl;
    return 0;
}
0