1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | void is_reachable(int a, int b, int time_limit)
{
int dist;
int result;
if (a <= b) {
dist = (b - a);
} else {
dist = (a - b);
};
if (dist <= (time_limit * 10)) {
result = 1;
} else {
result = 0;
};
}
|