結果
| 問題 |
No.1010 折って重ねて
|
| コンテスト | |
| ユーザー |
goto_isyuku
|
| 提出日時 | 2020-03-20 21:44:56 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 439 ms / 2,000 ms |
| コード長 | 637 bytes |
| コンパイル時間 | 1,484 ms |
| コンパイル使用メモリ | 166,360 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-15 05:07:19 |
| 合計ジャッジ時間 | 3,127 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
ソースコード
#include <bits/stdc++.h>
#define rep(X,N) for(ll X = 0; X < (N); X++)
#define PI (acos(-1.0))
#define pback push_back
#define mpair make_pair
#define MODN 1000000007
#define ALL(V) (V).begin(),(V).end()
#define INT_MAX_HALF (INT_MAX / 2)
#define EPS (1e-10)
using namespace std;
typedef long long ll;
int ans = 0;
void dfs(double x, double y, double h, int c){
ans = max(ans, c);
if(x > h){
dfs(x / 2, y, h * 2, c + 1);
}
if(y > h){
dfs(x, y / 2, h * 2, c + 1);
}
}
int main(){
double x, y, h;
cin >> x >> y >> h;
h = h * 0.001;
dfs(x, y, h, 0);
cout << ans << endl;
}
goto_isyuku