結果
問題 |
No.909 たぴの配置
|
ユーザー |
![]() |
提出日時 | 2019-09-05 18:04:23 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 472 bytes |
コンパイル時間 | 2,080 ms |
コンパイル使用メモリ | 195,708 KB |
最終ジャッジ日時 | 2025-01-07 16:29:48 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; const int inf = 1 << 30; int main() { int N; cin >> N; vector< int > X(N), Y(N); for(auto &x : X) cin >> x; for(auto &y : Y) cin >> y; int ret = inf; for(int i = 0; i < N; i++) { ret = min(ret, X[i] + Y[i]); } ++ret; cout << ret << endl; cout << 0 << endl; for(int i = 0; i < N; i++) { int need = X[i] + Y[i] - ret; cout << X[i] - min(X[i], need) << endl; } cout << ret << endl; }