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