結果

問題 No.1010 折って重ねて
ユーザー Hasegawa_frogHasegawa_frog
提出日時 2020-03-20 21:37:28
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 753 bytes
コンパイル時間 1,830 ms
コンパイル使用メモリ 167,812 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-15 04:44:33
合計ジャッジ時間 2,794 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
 
typedef long long ll;
typedef vector<pair<ll, ll>> pll;
 
#define mod 1000000007
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define popcount(x) __builtin_popcountll(x)
 
const long double PI = acos(-1);
 
ll gcd(ll a,ll b){return b ? gcd(b,a%b) : a;}
ll lcm(ll a,ll b){return a / gcd(a,b) * b;}
ll stringcount(string s, char c){return count(s.cbegin(), s.cend(), c);}
bool isInteger(double x){return floor(x) == x;}

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

  double x, y, h;
  cin >> x >> y >> h;

  h /= 1000;

  ll ans = 0;
  while(x > h){
    x /= 2;
    h *= 2;
    ans++;
  }
  while(y > h){
    y /= 2;
    h *= 2;
    ans++;
  }
  cout << ans << endl;
  return 0;
}
0