foo.cc: In function 'void dfs(std::vector<std::vector<int> >&, int, int)':
foo.cc:5:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
5 | if (i < 0 || i >= islands.size() || j < 0 || j >= islands[0].size() || islands[i][j] == 0) {
| ~~^~~~~~~~~~~~~~~~~
foo.cc:5:52: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
5 | if (i < 0 || i >= islands.size() || j < 0 || j >= islands[0].size() || islands[i][j] == 0) {
| ~~^~~~~~~~~~~~~~~~~~~~
foo.cc: In function 'int countIslands(std::vector<std::vector<int> >&)':
foo.cc:17:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
17 | for (int i = 0; i < islands.size(); ++i) {
| ~~^~~~~~~~~~~~~~~~
foo.cc:18:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
18 | for (int j = 0; j < islands[0].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务