結果

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

ソースコード

diff #

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

signed main(){
  double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2;
  double xd = fabs( x1 - ( x1 + x2 ) / 2 );
  double yd = fabs( y1 - ( y1 + y2 ) / 2 );
  double ans = xd + yd;
  ans *= 2;
  int z = ( int ) ( ans + 1e-8 );
  if( z & 1 )
    cout << z / 2 << "." << 5 << endl;
  else
    cout << z / 2 << endl;
  return 0;
}
0