Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int seta(int a[][30],int n,int x[],int h)
- {
- for(int i=1;i<h;i++)
- if(a[x[i]][x[i+1]==0) return 0;
- return 1;
- }
- int vonal(int a[][30],int n,int x[],int h)
- {
- if(!seta(a,n,x,h)) return 0;
- else{
- for(int i=1;i<h-1;i++)
- for(int j=i+1;j<h;j++)
- if((x[i]==x[j]) && x[i+1]==x[j+1])
- if(x[i]==x[j+1] && x[i+1]==x[j])
- return 0;
- return 1;
- }
- }
- }
- int ut(int a[][30],int n,int x[],int h)
- {
- if(!seta(a,n,x,h)) return 0;
- else{for(int i=1;i<h-1;i++)
- for(int j=i+1;j<h;j++)
- if(x[i]==x[j]) return 0;
- return 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement