結果
問題 | No.1010 折って重ねて |
ユーザー |
![]() |
提出日時 | 2020-04-10 00:36:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 571 bytes |
コンパイル時間 | 940 ms |
コンパイル使用メモリ | 71,960 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-14 03:28:41 |
合計ジャッジ時間 | 2,274 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 WA * 13 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #define rep(i, a, n) for(int i = a; i < n; i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { double x, y, h; cin >> x >> y >> h; int ans = 0; double X = 1000*x, Y = 1000*y; while(X > h || Y > h){ if(X > h){ X /= 2; h *= 2; } else{ Y /= 2; h *= 2; } //cout << X << " " << Y << endl; ans++; } cout << ans << endl; return 0; }