結果

問題 No.909 たぴの配置
コンテスト
ユーザー hipopo
提出日時 2020-01-11 14:58:50
言語 C++17
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc15.so -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 462 ms / 3,000 ms
+ 816µs
コード長 550 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,229 ms
コンパイル使用メモリ 214,248 KB
実行使用メモリ 9,840 KB
最終ジャッジ日時 2026-10-25 04:40:04
合計ジャッジ時間 9,422 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge7_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

using ll = long long;

int main() {
    int n;
    cin >> n;
    vector<int> x(n), y(n);
    for (int i = 0; i < n; i++) {
        cin >> x.at(i);
    }
    for (int i = 0; i < n; i++) {
        cin >> y.at(i);
    }

    int min_d = 2 * (int)1e6;
    for (int i = 0; i < n; i++) {
        min_d = min(min_d, x.at(i) + y.at(i));
    }
    
    cout << min_d << endl;
    cout << 0 << endl;
    for (int i = 0; i < n; i++) {
        cout << min(x.at(i), min_d) << endl;
    }
    cout << min_d << endl;
}
0