結果
問題 | No.909 たぴの配置 |
ユーザー |
![]() |
提出日時 | 2019-12-17 22:37:47 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 351 ms / 3,000 ms |
コード長 | 559 bytes |
コンパイル時間 | 1,939 ms |
コンパイル使用メモリ | 169,800 KB |
実行使用メモリ | 6,528 KB |
最終ジャッジ日時 | 2024-07-04 18:59:58 |
合計ジャッジ時間 | 7,651 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> x(n); vector<int> y(n); vector<long long> z(n); long long d=1000000000; for(int i=0;i<n;i++){ cin >> x[i]; } for(int i=0;i<n;i++){ cin >> y[i]; z[i]=x[i]+y[i]; d=min(d,z[i]); } cout << d << endl; cout << 0 << endl; for(int i=0;i<n;i++){ if(x[i]>d){ cout << d << endl; } else{ cout << x[i] << endl; } } cout << d << endl; }