結果
| 問題 |
No.965 門松列が嫌い
|
| コンテスト | |
| ユーザー |
daruma_jp
|
| 提出日時 | 2020-04-09 18:01:23 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 325 bytes |
| コンパイル時間 | 1,082 ms |
| コンパイル使用メモリ | 68,204 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-13 15:08:41 |
| 合計ジャッジ時間 | 1,246 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 9 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long;
int main() {
int a, b, c;
cin >> a >> b >> c;
int num = abs(a - c);
if (max(a, c) - num < b) num = b - min(a, c) - 1;
if ((a > b > c) || (a < b < c)) cout << "0" << endl;
else cout << num << endl;
return 0;
}
daruma_jp