We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 992e3fe commit 7643459Copy full SHA for 7643459
263A - Beautiful Matrix.cpp
@@ -0,0 +1,25 @@
1
+#include<bits/stdc++.h>
2
+using namespace std;
3
+
4
+// Code Written By: Vikash Patel
5
6
+// Codeforces Profile: https://codeforces.com/profile/vikashpatel
7
8
+int main()
9
+{
10
+ int mat[5][5];
11
+ int m,n;
12
+ for(int i=0;i<5;i++)
13
+ {
14
+ for(int j=0;j<5;j++)
15
16
+ cin>>mat[i][j];
17
+ if(mat[i][j]==1)
18
19
+ m=i+1;
20
+ n=j+1;
21
+ }
22
23
24
+ cout<<abs(m-3)+abs(n-3)<<endl;
25
+}
0 commit comments