結果
| 問題 |
No.909 たぴの配置
|
| コンテスト | |
| ユーザー |
YamaKasa
|
| 提出日時 | 2019-12-05 19:09:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 624 bytes |
| コンパイル時間 | 1,831 ms |
| コンパイル使用メモリ | 166,152 KB |
| 実行使用メモリ | 6,656 KB |
| 最終ジャッジ日時 | 2024-12-21 14:46:41 |
| 合計ジャッジ時間 | 7,388 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 WA * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int N;
cin >> N;
ll X[N], Y[N];
ll x_min = LLONG_MAX;
for (int i = 0; i < N; i++) {
cin >> X[i];
x_min = min(x_min, X[i]);
}
for (int i = 0; i < N; i++) {
cin >> Y[i];
}
ll d = LLONG_MAX;
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++) {
if (x_min + Y[i] < d) {
x_min = d - Y[i];
}
cout << x_min << "\n";
}
cout << d << "\n";
return 0;
}
YamaKasa