結果
問題 | No.909 たぴの配置 |
ユーザー | 🍮かんプリン |
提出日時 | 2019-10-18 22:31:13 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 381 ms / 3,000 ms |
コード長 | 584 bytes |
コンパイル時間 | 2,175 ms |
コンパイル使用メモリ | 159,328 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-25 17:38:55 |
合計ジャッジ時間 | 7,690 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
#include "bits/stdc++.h" #define REP(i, n) for(int i = 0; i < int(n); i++) #define FOR(i,n,m) for(int i = int(n); i < int(m); i++) using namespace std; typedef long long ll; const int MOD = 1e9 + 7; const int INF = 1e9 + 6; const ll LLINF = 1e18 + 1; int main() { int n; cin >> n; vector<int> x(n), y(n); REP(i, n) cin >> x[i]; REP(i, n) cin >> y[i]; int s = INF; REP(i, n) { s = min(s, x[i] + y[i]); } cout << s << endl; cout << 0 << endl; REP(i, n) { cout << min(s, x[i]) << endl; } cout << s << endl; return 0; }