Infinitely large grid of water; cells can be converted to land at any time; answer repeated queries of how many islands there are
Asked in the Round 1 stage. Treat cells as connected only through their four direct neighbors. A query asks for the island count after a specified operation has been applied.
query_id, operation_id, and island_countquery_id order| Column | Type | Description |
|---|---|---|
| operation_idPK | INT | Sequential land-conversion operation identifier |
| row_coord | INT | Row coordinate of the converted cell |
| col_coord | INT | Column coordinate of the converted cell |
| operation_note | VARCHAR(100) | Optional note about the operation |
| Column | Type | Description |
|---|---|---|
| query_idPK | INT | Identifier for the repeated query |
| operation_id | INT | Operation state at which the island count is requested |
| query_label | VARCHAR(100) | Optional label for the query |