結果

問題 No.909 たぴの配置
ユーザー sbitesbite
提出日時 2019-10-18 21:49:38
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 366 ms / 3,000 ms
コード長 949 bytes
コンパイル時間 2,097 ms
コンパイル使用メモリ 144,260 KB
実行使用メモリ 5,048 KB
最終ジャッジ日時 2023-09-07 21:55:07
合計ジャッジ時間 8,111 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 344 ms
4,936 KB
testcase_06 AC 364 ms
4,984 KB
testcase_07 AC 341 ms
4,940 KB
testcase_08 AC 342 ms
4,928 KB
testcase_09 AC 361 ms
5,048 KB
testcase_10 AC 339 ms
4,792 KB
testcase_11 AC 332 ms
4,780 KB
testcase_12 AC 345 ms
4,940 KB
testcase_13 AC 366 ms
4,904 KB
testcase_14 AC 337 ms
4,788 KB
testcase_15 AC 335 ms
4,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define ll long long
#define lld long double
#define ALL(x) x.begin(), x.end()
#ifdef DEBUG
#define line() cerr << "[" << __LINE__ << "] ";
#define dump(i) cerr << #i ": " << i << " ";
#define dumpl(i) cerr << #i ": " << i << endl;
#else
#define line(i)
#define dump(i)
#define dumpl(i)
#endif
using namespace std;
int main(int argc, char const *argv[])
{
    int n;
    cin >> n;
    int x[n], y[n];
    rep(i, n) cin >> x[i];
    rep(i, n) cin >> y[i];
    int dist = 2 * 1e7;
    rep(i, n)
    {
        dist = min(dist, x[i] + y[i]);
    }
    cout << dist << endl;
    cout << 0 << endl;
    rep(i, n)
    {

        cout << min(x[i], abs(dist - y[i])) << endl;
    }
    cout << dist << endl;
    return 0;
}
0