結果
| 問題 |
No.1010 折って重ねて
|
| コンテスト | |
| ユーザー |
w1steri4sec
|
| 提出日時 | 2020-03-22 21:27:06 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 934 bytes |
| コンパイル時間 | 1,511 ms |
| コンパイル使用メモリ | 167,056 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-26 01:03:31 |
| 合計ジャッジ時間 | 2,888 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 40 WA * 3 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define repeq(i,n) for(int (i)=0;(i)<=(int)(n);(i)++)
#define rep1(i,x,n) for(int (i)=(x);(i)<(int)(n);(i)++)
#define rep1eq(i,x,n) for(int (i)=(x);(i)<=(int)(n);(i)++)
#define rrep(i,x) for(int i=((int)(x)-1);i>=0;i--)
using namespace std;
using ll = long long;
using Int = long long;
const int MOD = 1000000007;
const ll INF = numeric_limits<ll>::max();
const int inf = 1e8;
//typedef pair<int,int> P;
//少数点表示
//cout << std::fixed << std::setprecision(14) <<double値
int main(){
cin.tie( 0 ); ios::sync_with_stdio( false );
ll x,y;
double h;
cin >> x >> y >> h;
x *= 1000;
y *= 1000;
if(x > y) swap(x,y);
ll count = 0;
while(x > h){
x /= 2;
h *= 2;
count++;
}
while(y > h){
y /= 2;
h *= 2;
count++;
}
cout << count << endl;
return 0;
}
w1steri4sec