Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdC++.h>
- using namespace std;
- int main()
- {
- int a,c=0,x,y,z,sum=0;
- for(int i=0;i<25;i++)
- {
- c++;
- scanf("%d",&a);
- if(a==1)z=c;
- }
- //cout<<z<<endl;
- x= z%5;
- y=z/5;
- if(x>0)y+=1;
- if(x==0)x+=1;
- x=abs(3-x);
- y=abs(3-y);
- printf("%d\n",x+y);
- return 0;
- }
Add Comment
Please, Sign In to add comment