結果
問題 | No.965 門松列が嫌い |
ユーザー |
|
提出日時 | 2020-01-13 20:29:48 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 1,347 bytes |
コンパイル時間 | 1,607 ms |
コンパイル使用メモリ | 161,512 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-21 16:17:03 |
合計ジャッジ時間 | 1,842 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
#include <bits/stdc++.h>#define rep(i,n) for(int i = 0; i < n; i++)#define mrep(i,j,n) for(int i = j; i < n; i++)#define reps(i,n) for(int i = 1; i <= n; i++)#define rrep(i,n) for(int i = n-1; i >= 0; i--)#define rreps(i,n) for(int i = n; i >= 1; i--)#define co(x) cout << x <<endl#define cs(x) cout << x <<" "#define el cout<<endl#define cer(x) cerr << x <<endl#define all(x) (x).begin(),(x).end()#define sz(x) ((int)(x).size())#define ERASE(x,val) x.erase(remove(ALL(x), val), x.end())#define vi vector<int>#define vvi vector<vector<int>>#define vpii vector<pair<int,int>>#define vl vector<ll>#define vvl vector<vector<ll>>#define vb vector<bool>#define vvb vector<vector<bool>>#define vs vector<string>typedef long long ll;typedef unsigned long long ull;using namespace std;ll mod = 1e9 + 7;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; }ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }ll lcm(ll a, ll b) { ll g = gcd(a, b); return a * b / g; }bool is_prime(ll x) { for (ll i = 2; i * i <= x; i++) { if (x % i == 0)return false; } return true; }int main(){vi a(3);rep(i, 3)cin >> a[i];sort(all(a));co(min(a[2] - a[1], a[1] - a[0]));return 0;}