Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #define MAX_SZ 1000
- int SeparateIsland = 0,BiggestIsland = 0;
- int TraverseMap(char *A[], int m, int n)
- {
- int i=0,j=0;
- for(;i<m;i++)
- {
- for(;j<n;j++)
- {
- }
- }
- }
- int SearchEight(char *A[], int index_i, int index_j)
- {
- int i=0,j=0;
- for(i=index_i-1; i<=index_i+1; i++)
- {
- for(j=index_j-1; j<=index_j+1; j++)
- {
- if( A[i][j] == '#' ) BiggestIsland++;
- }
- }
- BiggestIsland--; //(i,j) must be repeated
- if(BiggestIsland == 1) return -1; //No one nearby
- else return 0;
- }
- int main(int argc, const char * argv[])
- {
- int m=0,n=0,cnt=0;
- scanf("%d %d",&m,&n);
- char Island[MAX_SZ][MAX_SZ];
- while(cnt<n)
- scanf("%s",Island[cnt++]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment