結果
| 問題 |
No.909 たぴの配置
|
| コンテスト | |
| ユーザー |
merom686
|
| 提出日時 | 2019-10-18 21:37:11 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 52 ms / 3,000 ms |
| コード長 | 757 bytes |
| コンパイル時間 | 880 ms |
| コンパイル使用メモリ | 75,740 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-25 15:11:07 |
| 合計ジャッジ時間 | 3,571 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<int> x(n), y(n);
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
int d = 1 << 30;
for (int i = 0; i < n; i++) {
d = min(d, x[i] + y[i]);
}
cout << d << '\n';
cout << 0 << '\n';
for (int i = 0; i < n; i++) {
//int l = 0, r = d;
//r = min(r, x[i]);
//[-x,x] [d-y,d+y]
cout << min(x[i], d) << '\n';
}
cout << d << '\n';
return 0;
}
merom686