結果

問題 No.1027 U+1F4A0
ユーザー kanra824
提出日時 2020-04-17 21:30:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,162 bytes
コンパイル時間 1,549 ms
コンパイル使用メモリ 168,156 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-03 11:20:07
合計ジャッジ時間 2,051 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

#define SZ(x) (int)(x.size())

using ll = long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
const ld eps = 1e-9;
const ll MOD = 1000000007;
const int INF = 1000000000;
const ll LINF = 1ll<<50;

template<typename T>
void printv(const vector<T>& s) {
  for(int i=0;i<(int)(s.size());++i) {
    cout << s[i];
    if(i == (int)(s.size())-1) cout << endl;
    else cout << " ";
  }
}

template<typename T1, typename T2>
ostream& operator<<(ostream &os, const pair<T1, T2> p) {
  os << p.first << ":" << p.second;
  return os;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);

  double d1, d3; cin >> d1 >> d3;
  d1 = sqrt(d1);
  d3 = sqrt(d3);

  double d2 = d3 / sqrt(2);
  if(d3 < d1 - eps) {
    cout << 0 << endl;
  } else if(abs(d1 - d3) < eps) {
    cout << 4 << endl;
  } else if(d2 + eps < d1 && d1 < d3 - eps) {
    cout << 8 << endl;
  } else if(abs(d1 - d2) < eps) {
    cout << 4 << endl;
  } else {
    cout << 0 << endl;
  }

  
}
0