結果
問題 |
No.1010 折って重ねて
|
ユーザー |
|
提出日時 | 2020-03-20 21:24:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 559 ms / 2,000 ms |
コード長 | 463 bytes |
コンパイル時間 | 1,474 ms |
コンパイル使用メモリ | 166,824 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-15 03:35:22 |
合計ジャッジ時間 | 3,537 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) #define repr(i, n) for (int i = (n) - 1; i >= 0; i--) #define range(a) a.begin(), a.end() int f(ll x, ll y, ll z) { int res = 0; if (x > z) res = max(res, f(x, y * 2, z * 4) + 1); if (y > z) res = max(res, f(x * 2, y, z * 4) + 1); return res; } int main() { ll x, y, z; cin >> x >> y >> z; cout << f(x * 1000, y * 1000, z) << endl; }