## Editorial for CCC '17 J3 - Exactly Electrical

Remember to use this editorial

**only**when stuck, and**not to copy-paste code from it**. Please be respectful to the problem author and editorialist.**Submitting an official solution before solving the problem yourself is a bannable offence.**Authors:

For this problem, we make the observation that if the car can reach any intersection using electric charges, it can do so in charges. This means that if the number of charges left over after reaching is a non-negative even number, then we should output `Y`

, otherwise output `N`

.

**Time Complexity:**

#### Solution — D

```
import std.math;
import std.stdio;
int a, b, c, d, dis, t;
void main() {
scanf("%d%d%d%d%d", &a, &b, &c, &d, &t);
dis = abs(a - c) + abs(b - d);
if(dis <= t && !((t - dis) % 2))
write("Y");
else
write("N");
}
```

## Comments

IDK what that means. whats %d and &a and dis...