Piloto Automático

Problem Link

Solution by TheRealFertos100 pts

Code / Notes

#include <bits/stdc++.h>
using namespace std;

int main () {
    int a, b, c;
    cin >> a >> b >> c;
    if ((b-a)>(c-b)) {
        cout << -1;
    }
    else if ((b-a)<(c-b)) {
        cout << 1;
    }
    else {
        cout << 0;
    }
}

Last updated 2 weeks, 3 days ago


« Back to problem