結果
| 問題 |
No.1010 折って重ねて
|
| コンテスト | |
| ユーザー |
AkabaEri
|
| 提出日時 | 2020-03-28 17:35:51 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 344 bytes |
| コンパイル時間 | 1,667 ms |
| コンパイル使用メモリ | 160,132 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2025-01-02 11:52:57 |
| 合計ジャッジ時間 | 3,062 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 29 |
ソースコード
#include <bits/stdc++.h>
using ll = long long int;
using namespace std;
ll mod=1e9+7;
int dfs(int x,int 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