結果

問題 No.909 たぴの配置
ユーザー shop_oneshop_one
提出日時 2019-10-18 22:01:22
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 376 ms / 3,000 ms
コード長 445 bytes
コンパイル時間 734 ms
コンパイル使用メモリ 60,652 KB
実行使用メモリ 6,576 KB
最終ジャッジ日時 2023-09-07 23:28:19
合計ジャッジ時間 8,815 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 356 ms
6,428 KB
testcase_06 AC 376 ms
6,524 KB
testcase_07 AC 341 ms
6,212 KB
testcase_08 AC 363 ms
6,344 KB
testcase_09 AC 375 ms
6,576 KB
testcase_10 AC 346 ms
6,284 KB
testcase_11 AC 335 ms
6,208 KB
testcase_12 AC 348 ms
6,372 KB
testcase_13 AC 363 ms
6,456 KB
testcase_14 AC 342 ms
6,212 KB
testcase_15 AC 348 ms
6,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
signed main(){
  ll n,ans=10000000000000;
  cin >> n;
  ll x[n],y[n],tapi[n];
  for(int i=0;i<n;i++){
    cin >> x[i];
  }
  for(int i=0;i<n;i++){
    cin >> y[i];
    ans = min(x[i]+y[i],ans);
  }
  cout <<ans << endl;
  cout << "0\n";
  for(int i=0;i<n;i++){
    cout << min(x[i],ans)<<endl;
  }
  cout << ans << endl;
}
0