結果

問題 No.909 たぴの配置
ユーザー たぴちゃんたぴちゃん
提出日時 2019-10-17 21:27:42
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 631 bytes
コンパイル時間 2,642 ms
コンパイル使用メモリ 201,680 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-07 20:48:38
合計ジャッジ時間 8,475 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
    int n;
    cin >> n;
    assert(1 <= n && n <= 100000);
    vector<int64> x(n), y(n);
    for(int i = 0; i < n; i++){
        cin >> x[i];
        assert(0 <= x[i] && x[i] <= 1000000);
    }
    for(int i = 0; i < n; i++){
        cin >> y[i];
        assert(0 <= y[i] && y[i] <= 1000000);
    }
    int64 MIN = x[0] + y[0];
    for(int i = 1; i < n; i++) MIN = min(MIN, x[i] + y[i]);
    cout << MIN << endl << 1e17 << endl;
    for(int i = 0; i < n; i++) cout << min(1e17 + x[i], 1e17 + MIN - y[i]) << endl;
    cout << 1e17 + MIN << endl;
}
0