Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i < N * N; i++)
- {
- if (sky[i] == 0)
- empty_places++;
- if (sky[i] == 1)
- {
- if ((i % N > 0) && sky[i + 1] == 1)
- make_union(i, i + 1);
- if ((i + N < N * N) && sky[i + N] == 1)
- make_union(i, i + N);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement