結果

問題 No.909 たぴの配置
ユーザー face4face4
提出日時 2019-10-18 21:45:00
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 387 ms / 3,000 ms
コード長 452 bytes
コンパイル時間 569 ms
コンパイル使用メモリ 65,736 KB
実行使用メモリ 6,680 KB
最終ジャッジ日時 2023-09-07 21:46:27
合計ジャッジ時間 6,845 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 373 ms
6,344 KB
testcase_06 AC 387 ms
6,472 KB
testcase_07 AC 347 ms
6,264 KB
testcase_08 AC 369 ms
6,408 KB
testcase_09 AC 384 ms
6,680 KB
testcase_10 AC 352 ms
6,216 KB
testcase_11 AC 347 ms
6,196 KB
testcase_12 AC 365 ms
6,356 KB
testcase_13 AC 372 ms
6,476 KB
testcase_14 AC 358 ms
6,220 KB
testcase_15 AC 352 ms
6,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
typedef long long ll;

int main(){
    int n;
    cin >> n;
    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 = 1e18;
    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