結果

問題 No.909 たぴの配置
ユーザー ganariyaganariya
提出日時 2019-10-18 21:40:32
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 372 ms / 3,000 ms
コード長 1,535 bytes
コンパイル時間 1,246 ms
コンパイル使用メモリ 142,056 KB
実行使用メモリ 6,368 KB
最終ジャッジ日時 2023-09-07 21:40:46
合計ジャッジ時間 7,620 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 352 ms
5,956 KB
testcase_06 AC 369 ms
6,368 KB
testcase_07 AC 336 ms
5,908 KB
testcase_08 AC 351 ms
5,908 KB
testcase_09 AC 367 ms
6,236 KB
testcase_10 AC 335 ms
6,032 KB
testcase_11 AC 337 ms
5,920 KB
testcase_12 AC 355 ms
6,044 KB
testcase_13 AC 372 ms
6,368 KB
testcase_14 AC 354 ms
6,232 KB
testcase_15 AC 356 ms
6,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <unordered_map>
#include <climits>
#include <set>
#include <unordered_set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
#include <random>
#include <complex>
#include <regex>
#include <locale>
#include <random>
#include <type_traits>

using namespace std;

#define SHOW_VECTOR(v) {std::cerr << #v << "\t:";for(const auto& xxx : v){std::cerr << xxx << " ";}std::cerr << "\n";}
#define SHOW_MAP(v){std::cerr << #v << endl; for(const auto& xxx: v){std::cerr << xxx.first << " " << xxx.second << "\n";}}

using LL = long long;

//------------------------------------------
//------------------------------------------


int main() {

    int N;
    cin >> N;

    vector<LL> X(N), Y(N);
    for (int i = 0; i < N; i++) cin >> X[i];
    for (int i = 0; i < N; i++) cin >> Y[i];

    LL minV = LONG_LONG_MAX;
    for (int i = 0; i < N; i++) minV = min(minV, X[i] + Y[i]);

    cout << minV << endl;
    cout << 0 << endl;
    for (int i = 0; i < N; i++) {
        if (X[i] <= minV) cout << X[i] << endl;
        else cout << minV << endl;
    }
    cout << minV << endl;

    return 0;
}



















































0