結果

問題 No.410 出会い
ユーザー hisocuhisocu
提出日時 2016-09-11 18:35:14
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,534 bytes
コンパイル時間 1,076 ms
コンパイル使用メモリ 115,728 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-10 20:08:55
合計ジャッジ時間 2,261 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 1 ms
4,376 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <ios>
#include <sstream>
#include <cstdio>

#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <numeric>
#include <regex>
#include <utility>

#include <cstddef>
#include <cstdint>
#include <cfloat>
#include <limits>

#include <array>
#include <bitset>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <valarray>
#include <vector>
#include <deque>
#include <forward_list>


#define for(i, a, b) for(itr i{a}; i < (b); ++i)
#define rfor(i, a, b) for(itr i{(b)-1};i >= (a); --i)
#define rep(i, n) for(i, 0, n)
#define rrep(i, n) rfor(i, 0, n)
#define all(a) std::begin(a), std::end(a)
#define type(t) decltype(t)
#define _it ::iterator
#define un unsigned
#define sc(t, a) static_cast<type>(a)

template<typename t>
inline bool in_range(t const &lower, t const &a, t const &upper){ return lower < a && a < upper;}

constexpr double inf = std::numeric_limits<double>::infinity();

using i8 = std::int_fast8_t;  using i16 = std::int_fast16_t;
using i32 = std::int_fast32_t;  using i64 = std::int_fast64_t;
using u8 = std::uint_fast8_t; using u16 = std::uint_fast16_t;
using u32 = std::uint_fast32_t; using u64 = std::uint_fast64_t;

using namespace std;

using itr = i32;


int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);

  double px, py, qx, qy;

  cin >> px >> py >> qx >> qy;

  qx -= px;
  qy -= py;

  cout<<fixed<< (abs(qx) + abs(qy)) / 2. <<endl;


  return 0;
}
0