結果

問題 No.909 たぴの配置
ユーザー NOSSNOSS
提出日時 2019-10-18 21:32:47
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 362 ms / 3,000 ms
コード長 466 bytes
コンパイル時間 1,848 ms
コンパイル使用メモリ 167,376 KB
実行使用メモリ 4,724 KB
最終ジャッジ日時 2023-09-07 21:26:20
合計ジャッジ時間 7,719 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 353 ms
4,724 KB
testcase_06 AC 362 ms
4,664 KB
testcase_07 AC 321 ms
4,492 KB
testcase_08 AC 341 ms
4,640 KB
testcase_09 AC 350 ms
4,564 KB
testcase_10 AC 319 ms
4,400 KB
testcase_11 AC 312 ms
4,384 KB
testcase_12 AC 323 ms
4,660 KB
testcase_13 AC 355 ms
4,692 KB
testcase_14 AC 318 ms
4,400 KB
testcase_15 AC 309 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

constexpr int IINF = INT_MAX;

int main(){
    int n;
    cin >> n;
    vector<int> x(n), y(n);
    for(int i=0;i<n;i++) cin >> x[i];
    for(int i=0;i<n;i++) cin >> y[i];
    int pos = IINF;
    for(int i=0;i<n;i++){
        pos = min(pos, x[i]+y[i]);
    }
    cout << pos << endl;
    cout << 0 << endl;
    for(int i=0;i<n;i++){
        cout << min(x[i], pos) << endl;
    }
    cout << pos << endl;
    return 0;
}
0