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