SHARE
TWEET

Untitled

a guest Dec 8th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for (int i = 0; i < N * N; i++)
  2. {
  3.     if (sky[i] == 0)
  4.         empty_places++;
  5.  
  6.     if (sky[i] == 1)
  7.     {
  8.         if ((i % N > 0) && sky[i + 1] == 1)
  9.                 make_union(i, i + 1);
  10.         if ((i + N < N * N) && sky[i + N] == 1)
  11.                 make_union(i, i + N);
  12.     }
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top