結果
問題 | No.965 門松列が嫌い |
ユーザー |
![]() |
提出日時 | 2020-01-13 20:29:18 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 859 bytes |
コンパイル時間 | 3,127 ms |
コンパイル使用メモリ | 175,716 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-21 16:16:49 |
合計ジャッジ時間 | 2,413 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
#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({max(A-B,B-A),max(C-B,B-C),max(C-A,A-C)}) << endl;}