結果
| 問題 |
No.909 たぴの配置
|
| コンテスト | |
| ユーザー |
たぴちゃん
|
| 提出日時 | 2019-10-18 16:16:40 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 524 bytes |
| コンパイル時間 | 2,284 ms |
| コンパイル使用メモリ | 194,288 KB |
| 最終ジャッジ日時 | 2025-01-07 22:26:37 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 3 WA * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
int main(){
int n;
cin >> n;
vector<int64> x(n), y(n);
for(int i = 0; i < n; i++){
cin >> x[i];
}
for(int i = 0; i < n; i++){
cin >> y[i];
}
int64 MIN = x[0] + y[0];
int64 l = 1;
for(int i = 1; i < n; i++) MIN = min(MIN, x[i] + y[i]);
cout << MIN << endl << l << endl;
for(int i = 0; i < n; i++) cout << max(min(l + x[i], l + MIN - y[i]), l - x[i]) << endl;
cout << l + MIN << endl;
}
たぴちゃん