For this Question: Bob is at the origin of a number line. He wants to reach a goal at coordinate X.
There is a wall at coordinate Y, which Bob cannot go beyond at first. However, after picking up a hammer at coordinate Z, he can destroy that wall and pass through.
Determine whether Bob can reach the goal. If he can, find the minimum total distance he needs to travel to do so.The input is given from Standard Input in the following format:
X Y Z

<b>Constraints</b>
−1000 &le; X, Y, Z &le; 1000
X, Y, and Z are distinct, and none of them is 0.
All values in the input are integers.If Bob can reach the goal, print the minimum total distance he needs to travel to do so. If he cannot, print -1 instead.<b>Sample Input 1</b> 
10 -10 1
<b>Sample Output 1</b> 
10

<b>Sample Input 2</b> 
20 10 -10
<b>Sample Output 2</b> 
40, I have written this Solution Code: #include<bits/stdc++.h>
#define L(i, j, k) for(int i = (j); i <= (k); ++i)
#define R(i, j, k) for(int i = (j); i >= (k); --i)
#define ll long long
#define sz(a) ((int) (a).size())
#define vi vector < int > 
#define me(a, x) memset(a, x, sizeof(a))
#define ull unsigned long long
#define ld __float128
using namespace std;
const int N = 1e6 + 7;
int n, x, y, z;
int main() {
	ios :: sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	cin >> x >> y >> z;
	if(abs(y) + abs(x - y) == abs(x)) {
		if(abs(y - z) + abs(y) == abs(z)) {
			cout << -1 << '\n';
		} else {
			cout << abs(z) + abs(z - x) << '\n';
		}
	} else {
		cout << abs(x) << '\n';
	}
	if(y > 0 && x < y) {
		
	}
	return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?