28 lines
466 B
C++
28 lines
466 B
C++
#include "../../debugging.h"
|
|
|
|
#include <cstdio>
|
|
#include <iostream>
|
|
using namespace std;
|
|
|
|
int main() {
|
|
freopen("lostcow.in", "r", stdin);
|
|
freopen("lostcow.out", "w", stdout);
|
|
|
|
/**
|
|
John has lost his cow
|
|
Bessie is at some location on a number line
|
|
John at x, Bessie at y
|
|
|
|
**/
|
|
|
|
int x, y;
|
|
cin >> x >> y;
|
|
|
|
int powTwo = 1, res = 0;
|
|
while (!((x + powTwo <= y && y <= x) || (x <= y && y <= x + powTwo))) {
|
|
powTwo *= -2;
|
|
}
|
|
|
|
cout << res;
|
|
}
|