結果
| 問題 |
No.1010 折って重ねて
|
| コンテスト | |
| ユーザー |
AkabaEri
|
| 提出日時 | 2020-03-28 17:36:49 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 343 bytes |
| コンパイル時間 | 1,416 ms |
| コンパイル使用メモリ | 160,564 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2025-01-02 11:53:40 |
| 合計ジャッジ時間 | 2,640 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 WA * 16 |
ソースコード
#include <bits/stdc++.h>
using ll = long long int;
using namespace std;
ll mod=1e9+7;
int dfs(ll x,ll y,int l,int ans){
if(x>l)return dfs(x/2,y,l*2,ans+1);
if(y>l)return dfs(x,y/2,l*2,ans+1);
return ans;
}
int main(){
ll x,y,l;
cin >> x >> y >> l;
x*=1000;
y*=1000;
if(x>y)swap(x,y);
cout << dfs(x,y,l,0) << endl;
}
AkabaEri