- In the first query, the government builds 3 layers of buildings on vertices 2, 3, and 4. Each of these vertices now has 3 floors, so the number of vertices with at least one floor is 3.
- In the second query, the government demolishes the top layer of building 2 (the second floor of building 2 will have a bridge to the third floor of building 3, so the top layer includes the second floor of building 2, the third floor of building 3, and building 4. The lower floors will automatically adjust the bridges to form layers). After that, the number of vertices with at least one floor is 3.
- In the third query, the government can only demolish 2 layers instead of 3 as planned because building 2 only has 2 floors left. Now, the building at vertex 2 has 0 floors left, while the building at vertex 3 has 1 floor left. The answer is 2.
- In the final query, when all vertices from 1 to 4 are built with two additional top layers, each vertex gains 2 more floors, so there are 4 vertices with buildings having at least one floor.