結果

問題 No.909 たぴの配置
ユーザー recososo
提出日時 2019-11-16 14:32:18
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 378 ms / 3,000 ms
コード長 415 bytes
コンパイル時間 1,670 ms
コンパイル使用メモリ 170,020 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-24 23:22:34
合計ジャッジ時間 8,429 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
  int n;cin >> n;
  vector<int> x(n+2),y(n+2);
  int ans=1e9;
  for(int i=1;i<=n;i++){
    cin >> x[i];
  }
  for(int i=1;i<=n;i++){
    cin >> y[i];
    ans=min(ans,x[i]+y[i]);
  }
  cout << ans << endl;
  vector<int> c(n+2);
  cout << 0 << endl;
  for(int i=1;i<=n;i++){
    cout << min(ans,x[i]) << endl;
  }
  cout << ans << endl;
}
0