結果

問題 No.965 門松列が嫌い
ユーザー NullKara
提出日時 2020-01-17 20:43:49
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 227 bytes
コンパイル時間 624 ms
コンパイル使用メモリ 62,720 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-25 17:02:00
合計ジャッジ時間 1,047 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 7 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>

using namespace std;

int main(){
    int A,B,C;
    cin>>A>>B>>C;

    int mx=max(A,C);
    int mi=min(A,C);

    if(B>mx){
        cout<<B-mx<<endl;
    }
    else {
        cout<<min(mx-mi,mi-B);
    }
}
0