This is a grid simulating the city. Player 1 is the bad guy. His job is to dig a tunnel from the bottommost part of the city (Starting from either of A12/C12/E12/G12/I12/K12/M12) right upto the top of the city (Ending with either of A0/C0/E0/G0/I0/K0/M0). It is also a simple path (no dead ends and no loops along the way). Once he finishes making the tunnel, the Good guy starts to guess and find out the exact location of the tunnel. The good guy wants to probe a minimum number of times and yet be able to find the exact route of the tunnel.
Suppose a probe can tell whether a tunnel ran under an intersection or not and which of the four possible entering streets the tunnel runs under. We call these directional probes. If the tunnel is at most k blocks long and begins at Start and ends at End, then what is the minimum number of directional probe devices you would need to place to guarantee to determine the precise route of the tunnel in two rounds? That is, you'll place some number of probes in the first round and you can move those probes in the second hour based on the responses from the first. Your score is the total number of probes you use in either hour.
Instructions
1) First enter N that is the maximum number of blocks the tunnel can be
2) The Bad guy starts by putting in values of the intersections in the textbox. The values in the text box should be the intersections that join the streets and avenues. There should be a comma "," between 2 intersections. A valid example of a tunnel would be "a12,a10,c10,c8,c6,c4,c2,e2,g2,g0"
3) Once the Bad guy submits the tunnel, the good guy starts to put probes on the intersection points. Probes can only be put on intersection points. Once you click submit, the probes under which a part of the tunnel actually passes will turn blue and the others will turn red.
4) The Good guy has one more chance to do the same thing as step 3. Once the 2 attempts are done, he has to enter the path in the text box below. The path will be a series of intersections seperated by a comma. A valid example is "A12,A10,C10,C8,C6,C4,C2,E2,G2,G0"
If the guess is correct, you win, else you lose