結果

問題 No.909 たぴの配置
ユーザー pekempeypekempey
提出日時 2019-10-18 22:36:01
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 296 ms / 3,000 ms
コード長 710 bytes
コンパイル時間 1,659 ms
コンパイル使用メモリ 167,536 KB
実行使用メモリ 4,692 KB
最終ジャッジ日時 2023-09-08 00:28:37
合計ジャッジ時間 7,336 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 281 ms
4,684 KB
testcase_06 AC 287 ms
4,568 KB
testcase_07 AC 260 ms
4,380 KB
testcase_08 AC 271 ms
4,688 KB
testcase_09 AC 294 ms
4,692 KB
testcase_10 AC 260 ms
4,380 KB
testcase_11 AC 263 ms
4,460 KB
testcase_12 AC 278 ms
4,640 KB
testcase_13 AC 296 ms
4,616 KB
testcase_14 AC 266 ms
4,380 KB
testcase_15 AC 268 ms
4,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < (n); i++)
#define repr(i, n) for (int i = (n) - 1; i >= 0; i--)
#define rep2(i, l, r) for (int i = (l); i < (r); i++)
#define rep2r(i, l, r) for (int i = (r) - 1; i >= (l); i--)
#define range(a) a.begin(), a.end()

using namespace std;
using ll = long long;

int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  int n; cin >> n;
  vector<int> x(n), y(n);
  rep(i, n) cin >> x[i];
  rep(i, n) cin >> y[i];
  int ans = 1e9;
  rep(i, n) {
    ans = min(ans, x[i] + y[i]);
  }
  cout << ans << endl;
  cout << 0 << endl;
  rep(i, n) {
    cout << min(x[i], ans) << endl;
  }
  cout << ans << endl;
}
0