結果

問題 No.909 たぴの配置
ユーザー 37zigen37zigen
提出日時 2019-10-18 23:13:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 529 bytes
コンパイル時間 654 ms
コンパイル使用メモリ 68,100 KB
実行使用メモリ 5,044 KB
最終ジャッジ日時 2023-09-08 02:10:44
合計ジャッジ時間 8,809 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
4,376 KB
testcase_02 WA -
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cmath>
#include <iostream>
#include <string>

const int NMAX = 212345;
int X[NMAX];
int Y[NMAX];

int main() {
  int N;
  std::cin >> N;
  for (int i = 0; i < N; ++i) std::cin >> X[i];
  for (int i = 0; i < N; ++i) std::cin >> Y[i];
  int ans = X[0] + Y[0];
  for (int i = 0; i < N; ++i) {
    ans = std::min(ans, X[i] + Y[i]);
  }
  std::cout << ans << std::endl;
  std::cout << 0 << std::endl;
  for (int i = 0; i < N; ++i) {
    std::cout << std::min(ans, X[0]) << std::endl;
  }
  std::cout << ans << std::endl;
}

0