pastebin
Add a new paste
View all pastes
Change language
Dutch
English
French
Russian
menu
URL Shortener
Multiple URL shortener
browser info
Whois IP and domain lookup
Capture a Website screenshot
Disqus Chatroom
Registration
pastebin
Paste Search Dynamic
Recent pastes
result
6 hours ago
string text
6 hours ago
arr
6 hours ago
sumNode
7 hours ago
num
7 hours ago
line lenght
7 hours ago
CompareKey
7 hours ago
List
7 hours ago
InitMethod
7 hours ago
ponovitev
7 hours ago
min get
#include <iostream>
#include <cmath>
#include <bits/stdc++.h>
#define ll long long
using
namespace
std;
int
main
(
)
{
ll n, m, h, w;
cin
>> n >> m >> h >> w;
auto
get =
[
&
]
(
ll N, ll M, ll H, ll W
)
{
ll ct =
0
;
while
(
H < N
)
{
N =
(
N +
1
)
/
2
;
ct++;
}
while
(
W < M
)
{
M =
(
M +
1
)
/
2
;
ct++;
}
return
ct;
}
;
cout
<< min
(
get
(
n, m, h, w
)
, get
(
m, n, h, w
)
)
;
return
0
;
}
Parsed in 0.003 seconds
Empty
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by disqus