結果
| 問題 |
No.126 2基のエレベータ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-10-12 04:08:02 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 232 bytes |
| コンパイル時間 | 1,631 ms |
| コンパイル使用メモリ | 192,960 KB |
| 最終ジャッジ日時 | 2025-01-15 06:49:33 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int a,b,s; cin >> a >> b >> s;
cout << min(abs(a-s)+s,abs(b-s)+abs(s-a)+a+(a==0?1:0)) << endl;
}