結果
問題 | No.965 門松列が嫌い |
ユーザー |
![]() |
提出日時 | 2020-01-13 20:23:39 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 452 bytes |
コンパイル時間 | 2,522 ms |
コンパイル使用メモリ | 193,832 KB |
最終ジャッジ日時 | 2025-01-08 17:27:31 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
#include<bits/stdc++.h> using namespace std; using Int = long long; template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;} //INSERT ABOVE HERE signed main(){ Int a,b,c; cin>>a>>b>>c; if(a<b&&b>c){cout<<min({b-max(a,c),abs(a-b),abs(a-c),abs(b-c)})<<endl;} if(a>b&&b<c){cout<<min({min(a,c)-b,abs(a-b),abs(a-c),abs(b-c)})<<endl;} return 0; }