abc056/abc056_b.cpp
///////////////////
/*
swap a & b to ensure a < b
Check if the rectanles are connected, if so return 0
else
    return distance between (a+w) and b
*/
swap a & b to ensure a < b
Check if the rectanles are connected, if so return 0
else
return distance between (a+w) and b
swap a & b to ensure a < b Check if the rectanles are connected if so return 0 else return distance between ( a + w ) and b
void solve()
{
    ll w, a, b, tmp;
    cin >> w >> a >> b;
    if (a > b)
    {
        tmp = a;
        a = b;
        b = tmp;
    }
    if (a + w < b)
        cout << (b - a - w);
    else
        cout << 0;
}
void solve ( ) { ll w , a , b , tmp ; cin >> w >> a >> b ; if ( a > b ) { tmp = a ; a = b ; b = tmp ; } if ( a + w < b ) cout << ( b - a - w ) ; else cout << 0 ; }
swap a & b to ensure a < b
Check if the rectanles are connected, if so return 0
else
return distance between (a+w) and b
swap a & b to ensure a < b Check if the rectanles are connected if so return 0 else return distance between ( a + w ) and b