int main() { //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); int n, m; cin >> n >> m; TGraph Graph (n, m); for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) { bool x; cin >> x; Graph.Vert[i][j] = x; } cout << Graph.BFS() << endl; //fclose(stdin); //fclose(stdout); return 0; }