結果

問題 No.965 門松列が嫌い
ユーザー soto800soto800
提出日時 2020-01-13 20:28:37
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 517 bytes
コンパイル時間 1,444 ms
コンパイル使用メモリ 164,552 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-23 12:59:33
合計ジャッジ時間 2,103 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

#define lli long long int
#define REP(i,s,n) for(int i=s;i<n;i++)
#define MOD 1000000007
#define NUM 2520
#define INF (1LL<<50)
#define DEBUG 0
#define mp(a,b) make_pair(a,b)
#define SORT(V) sort(V.begin(),V.end())
#define PI (3.141592653589794)

signed main(){

	lli a,b,c;
	cin>>a>>b>>c;

	if(c>a)swap(a,b);
	if(a==c){
		cout<<0<<endl;
		return 0;
	}

	lli ans = INF;
	if(a<b){
		ans = min(ans,b-a+1);
		ans = min(ans,a-c);
	}
	else{
		cout<<0<<endl;
	}

	return 0;
}
0