結果

問題 No.410 出会い
ユーザー 西尾
提出日時 2017-09-13 16:22:36
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 369 bytes
コンパイル時間 1,970 ms
コンパイル使用メモリ 166,752 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 11:24:57
合計ジャッジ時間 2,464 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

//No.410 出会い

#include <bits/stdc++.h>
using namespace std;

int main()
{
int i;
int PX;
int PY;
int QX;
int QY;
int X;
int Y;

	cin >> PX;
	cin >> PY;
	cin >> QX;
	cin >> QY;

	X = PX - QX;
	Y = PY - QY;
	if( X < 0 ) X *= - 1;
	if( Y < 0 ) Y *= - 1;

	i = X + Y;
	if( i % 2 == 0 )
		cout << i / 2 << endl;
	else
		cout << i / 2 << ".5" << endl;

	return 0;
}



0