結果

問題 No.909 たぴの配置
ユーザー yosupotyosupot
提出日時 2019-10-18 21:24:05
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 305 ms / 3,000 ms
コード長 1,852 bytes
コンパイル時間 2,358 ms
コンパイル使用メモリ 201,496 KB
実行使用メモリ 6,228 KB
最終ジャッジ日時 2023-09-07 21:08:16
合計ジャッジ時間 8,215 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 297 ms
5,964 KB
testcase_06 AC 305 ms
6,184 KB
testcase_07 AC 276 ms
5,956 KB
testcase_08 AC 300 ms
5,984 KB
testcase_09 AC 305 ms
6,228 KB
testcase_10 AC 283 ms
5,956 KB
testcase_11 AC 279 ms
5,964 KB
testcase_12 AC 285 ms
5,888 KB
testcase_13 AC 297 ms
6,200 KB
testcase_14 AC 273 ms
6,004 KB
testcase_15 AC 277 ms
6,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx")
//#undef LOCAL
#include <bits/stdc++.h>

using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n - 1); }
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;

#ifdef LOCAL
struct PrettyOS {
    ostream& os;
    bool first;
    template <class T> auto operator<<(T&& x) {
        if (!first) os << ", ";
        first = false;
        os << x;
        return *this;
    }
};
template <class... T> void dbg0(T&&... t) {
    (PrettyOS{cerr, true} << ... << t);
}
#define dbg(...)                                            \
    do {                                                    \
        cerr << __LINE__ << " : " << #__VA_ARGS__ << " = "; \
        dbg0(__VA_ARGS__);                                  \
        cerr << endl;                                       \
    } while (false);
#else
#define dbg(...)
#endif

template <class T, class U>
ostream& operator<<(ostream& os, const pair<T, U>& p) {
    return os << "P(" << p.first << ", " << p.second << ")";
}

template <class T> ostream& operator<<(ostream& os, const V<T>& v) {
    os << "[";
    for (auto d : v) os << d << ", ";
    return os << "]";
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
    int n;
    cin >> n;
    V<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 ans = TEN(18);
    for (int i = 0; i < n; i++) {
        ans = min(ans, x[i] + y[i]);
    }
    cout << ans << endl;
    cout << 0 << endl;
    for (int i = 0; i < n; i++) {
        cout << min(ans, x[i]) << endl;
    }
    cout << ans << endl;
    return 0;
}
0