結果
| 問題 |
No.1010 折って重ねて
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-03 12:28:51 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 701 bytes |
| コンパイル時間 | 637 ms |
| コンパイル使用メモリ | 91,360 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-28 17:45:33 |
| 合計ジャッジ時間 | 1,670 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<cmath>
#include<iomanip>
#include<map>
#include<cstring>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define vi vector<int>
#define vivi vector<vi>
const int INF = int(1e9);
typedef long long int ll;
/* -- template -- */
int main(){
double x, y, h;
cin >> x >> y >> h;
int count = 0;
x *=1000;y*=1000;
while(x > h || y > h){
if(x > y && y > h){
y /= 2;
h *= 2;
}else if(x > h){
x /= 2;
h *= 2;
}else{
y /= 2;
h *= 2;
}
++count;
}
cout << count;
}