結果
| 問題 | No.1010 折って重ねて |
| コンテスト | |
| ユーザー |
forest3
|
| 提出日時 | 2020-07-09 21:21:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 321 bytes |
| コンパイル時間 | 1,561 ms |
| コンパイル使用メモリ | 166,532 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-10-08 09:20:17 |
| 合計ジャッジ時間 | 3,093 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 40 WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long x, y, h;
cin >> x >> y >> h;
x *= 1000;
y *= 1000;
long long ans = 0;
while( x > h || y > h ) {
if( x < y && x > h ) x /= 2;
else if( y > h ) y /= 2;
else if( x > h ) x /= 2;
else break;
h *= 2;
ans++;
}
cout << ans << endl;
}
forest3