結果

問題 No.909 たぴの配置
ユーザー rpy3cpprpy3cpp
提出日時 2019-10-18 21:29:04
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 50 ms / 3,000 ms
コード長 519 bytes
コンパイル時間 2,002 ms
コンパイル使用メモリ 166,192 KB
実行使用メモリ 4,664 KB
最終ジャッジ日時 2023-09-07 21:18:35
合計ジャッジ時間 4,656 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 47 ms
4,568 KB
testcase_06 AC 48 ms
4,648 KB
testcase_07 AC 45 ms
4,584 KB
testcase_08 AC 48 ms
4,664 KB
testcase_09 AC 50 ms
4,632 KB
testcase_10 AC 45 ms
4,384 KB
testcase_11 AC 45 ms
4,380 KB
testcase_12 AC 46 ms
4,556 KB
testcase_13 AC 49 ms
4,624 KB
testcase_14 AC 45 ms
4,576 KB
testcase_15 AC 45 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

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