I quite enjoyed this problem and I would consider this to be one of the best ones I've solved so please check hints one at a time and don't spoil the fun of figuring out the solution yourself.

Hints:

First, let's worry about query 2. Which type of road is most optimal to destroy by any insurgent?

Observe that whenever you destroy any dirt road, a path using concrete roads will always exist as the villages form a straight chain using concrete roads. So we must destroy a concrete road.

But we cannot destroy any arbitrary concrete road. If there is a dirt road from village A to B then destroying any concrete road between A and B has no effect as a path will continue to exist. Can you come up with a necessary condition that makes destroying a concrete road effective?

Removal of a concrete road from K to K+1 will only be effective when there is no dirt road from i to j where 1 <= i <= K and K+1 <= J <= N. Can we use an array to augment this information?

Label the (concrete) edges as 1, 2, 3.. (n-1) where edge K links village K and K+1. Consider an array V[n-1] that represents the (concrete) edges. Store in V[i] the number of dirt roads that pass over edge i. (Drawing a diagram makes it clear). We see that we can remove only when V[i] = 0.

For Subtask 1 and 2, using this array approach works. Just modify V whenever a new dirt road is added or removed. For query of type 2, count number of i from a to b-1 where V[i] = 0. Complexity of this approach is O((M+Q)N)

For Subtask 3, note that we are working with intervals, updating over intervals, and querying over intervals. What does this remind you of?