結果
| 問題 |
No.965 門松列が嫌い
|
| コンテスト | |
| ユーザー |
minato
|
| 提出日時 | 2020-01-13 20:26:10 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 841 bytes |
| コンパイル時間 | 2,092 ms |
| コンパイル使用メモリ | 174,440 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-21 16:10:50 |
| 合計ジャッジ時間 | 2,698 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 4 WA * 5 |
ソースコード
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define EPS (1e-7)
#define INF (1e9)
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) x.begin(),x.end()
#define pii pair<int, int>
#define pll pair<long long, long long>
const double PI = acos(-1);
const ll MOD = 1000000007;
// const ll MOD = 998244353;
template<class T>
inline bool chmax(T &a, T b) {
if(a < b) {
a = b;
return true;
}
return false;
}
template<class T>
inline bool chmin(T &a, T b) {
if(a > b) {
a = b;
return true;
}
return false;
}
///////////////////////////////////////////////////////////////
int main() {
ios::sync_with_stdio(false); cin.tie(nullptr);
int A,B,C; cin >> A >> B >> C;
cout << min({B-A,B-C,max(C-A,A-C)}) << endl;
}
minato