結果
問題 |
No.965 門松列が嫌い
|
ユーザー |
![]() |
提出日時 | 2020-01-13 20:30:18 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 519 bytes |
コンパイル時間 | 2,250 ms |
コンパイル使用メモリ | 197,068 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-21 16:17:31 |
合計ジャッジ時間 | 2,728 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 7 WA * 2 |
ソースコード
#pragma GCC optimize("Ofast") #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; //#define int long long template<typename T> inline bool chmax(T& a,T b) { if (a < b) { a = b; return true; } return false; } template<typename T> inline bool chmin(T& a,T b) { if (a > b) { a = b; return true; } return false; } int main() { long long a, b, c; cin >> a >> b >> c; if (a < c) swap(a, c); long long d = abs(b-a)+1; long long e = abs(a-c); cout << min(d, e) << endl; return 0; }