initial commit
This commit is contained in:
parent
c3015e4c96
commit
60c5d4cda4
18
263A-BeautifulMatrix/263A.cpp
Normal file
18
263A-BeautifulMatrix/263A.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include<bits/stdc++.h>
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
int i,j,value,move,x,y;
|
||||
for(i=1;i<=5;i++)
|
||||
{
|
||||
for(j=1;j<=5;j++)
|
||||
{
|
||||
cin>>value;
|
||||
if(value==1) break;
|
||||
}
|
||||
if(value==1) break;
|
||||
}
|
||||
move= abs(i-3)+abs(j-3);
|
||||
cout<<move<<endl;
|
||||
}
|
Loading…
Reference in New Issue
Block a user