結果

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

ソースコード

diff #

#include<bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
using namespace std;
#define rep(i,x) for(ll i = 0; i < (ll)(x); i++)
#define rrep(i,x) for(ll i = (ll)(x)-1;0 <= i; i--)
#define reps(i,x) for(ll i = 1; i < (ll)(x)+1; i++)
#define rreps(i,x) for(ll i = (ll)(x); 1 <= i; i--)
#define debug(x) cerr << #x << ": " << (x) << "\n";
#define all(x) (x).begin(), (x).end()
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<ll,ll> Pll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef vector<vector<vector<ll>>> vvvl;
const ll INF = numeric_limits<ll>::max()/4;
const int n_max = 1e5+10;

int main(){
    ll x,y,h; cin >> x >> y >> h;
    x *= 1000;y *= 1000;
    ll cnt = 0;
    if(x > y)swap(x,y);
    while(y > h){
        if(x > h)x /= 2;
        else y /= 2;
        h *= 2;
        cnt++;
        if(x > y)swap(x,y);
    }

    cout << cnt << endl;
}
0