結果
| 問題 |
No.1010 折って重ねて
|
| コンテスト | |
| ユーザー |
mamimume____mo
|
| 提出日時 | 2020-03-20 22:17:19 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 644 bytes |
| コンパイル時間 | 1,013 ms |
| コンパイル使用メモリ | 91,092 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-15 06:24:18 |
| 合計ジャッジ時間 | 2,241 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
ソースコード
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <stack>
#include <vector>
#include <set>
#include <utility>
using namespace std;
typedef long long ll;
int main(){
double x,y;
cin >> x >> y;
x *= 1000;
y *= 1000;
ll h;
cin >> h;
int cnt = 0;
while(max(x,y) > h){
if(x < y)swap(x,y);
if(y > h){
y /= 2;
h *= 2;
}
else if(x > h){
x /= 2;
h *= 2;
}
cnt++;
}
cout << cnt << endl;
}
mamimume____mo