Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #include <math.h>
- #include<string>
- #define pi acos(-1.0)
- #define ll long long int
- #define sc scanf
- #define pf printf
- using namespace std;
- int main() {
- ll n, i, j, r;
- while(sc("%lld %lld %lld", &n, &i, &j)==3) {
- i=(i-1)/2;
- j=(j-1)/2;
- for(r=1; i!=j; r++) {
- i/=2;
- j/=2;
- }
- cout << r << "\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement