SHARE
TWEET

Untitled

a guest Sep 11th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int ii , jj;
  8.     for(int i = 0 ; i < 5 ; i++){
  9.         for(int j = 0; j < 5 ; j++){
  10.             int a;
  11.             cin >> a;
  12.             if(a == 1){
  13.                 ii = i+1;
  14.                 jj = j+1;
  15.             }
  16.         }
  17.     }
  18.     cout << abs(ii -3)+ abs(jj -3) << endl;
  19.  
  20.     return 0;
  21. }
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