結果

問題 No.909 たぴの配置
ユーザー 37zigen
提出日時 2019-10-18 23:13:17
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 529 bytes
コンパイル時間 624 ms
コンパイル使用メモリ 71,768 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-25 19:17:21
合計ジャッジ時間 8,758 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 2 WA * 11
権限があれば一括ダウンロードができます

ソースコード

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