题目链接:二维数组操作_牛客题霸_牛客网
注意点:没理解题意
#include<iostream>
using namespace std;
int main(){
int m,n;
while(cin >>m>>n){
if(m > 9 || n > 9) cout <<-1<<endl;
else cout <<0 << endl;
int x1,y1,x2,y2;
cin >>x1>>y1>>x2>>y2;
if(x1 >= m || y1 >= n ||x2 >= m || y2 >= n) cout <<-1<<endl;
else cout << 0 <<endl;
int row;
cin >>row;
if(row < 0 && row >=m || m == 9 ) cout <<-1<<endl;
else cout << 0 <<endl;
int column;
cin >>column;
if (column < 0 || column >= n || n == 9) cout <<-1 <<endl;
else cout <<0<<endl;
int x,y;
cin >> x >>y;
if(x < 0 || x >= m || y < 0 || y>= n) cout << -1 <<endl;
else cout << 0 <<endl;
}
return 0;
}