#include #include using namespace std; #define SZ 5 // Remember: never store the matrix // If you have to, store it as array int main(void){ int a; int b,c; for(int i = 0; i < SZ; i++){ for(int j = 0; j < SZ; j++){ cin>>a; if(a == 1){ b = i; c = j; goto result; } } } result: int rows = abs(2 - c); int columns = abs(2 - b); cout<