sadiqul_amin

wet lands of florida input.c

Jun 21st, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.66 KB | None | 0 0
  1. int main()
  2. {
  3.     // freopen("input.txt", "r", stdin);
  4.     // freopen("output.txt", "w", stdout);
  5.  
  6.     int t, T, i, j, k;
  7.     int x, y;
  8.     int u, v;
  9.     char st[100];
  10.     int fcheck = 0;
  11.  
  12.     scanf("%d", &T);
  13.     getchar();
  14.     getchar();
  15.  
  16.     for (t = 1; t <= T; t++)
  17.     {
  18.         i = 0;
  19.         n = 0;
  20.         m = 0;
  21.  
  22.         if (t != 1)
  23.             printf("\n");
  24.  
  25.         init(); // to initialize the grid with '\0'
  26.  
  27.         while ( gets(grid[i]) )
  28.         {
  29.             if (grid[i][0] == '\0')
  30.                 break;
  31.             if (grid[i][0] != 'W' && grid[i][0] != 'L' && 0 == n)
  32.                 n = i;
  33.             i++;
  34.         }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment