this problem seems to be easy.

what i have done is

1. i used floyd warshall for shortest distance

2. then check whether any point exist which is equidistance from 1,2,3,4,5

(the fr five points)

3.if such point exists then did what the problem said.

sorry for paosting the code.

but i have got w.a. for 15 times.tried with all possible ways.

plz help

Code: Select all

```
got ac
```