import java.util.Scanner;
public class OperateArray {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int row = scan.nextInt();
int colum = scan.nextInt();
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
int d = scan.nextInt();
int e = scan.nextInt();
int f = scan.nextInt();
int g = scan.nextInt();
int h = scan.nextInt();
print("0");
if((a < row && a >= 0 && b < colum && b >= 0)&&
(c < row && c >= 0 && d < colum && d >= 0))
print("0");
else
print("-1");
if(e < row && e >= 0)
print("0");
else
print("-1");
if(f < colum && f >= 0)
print("0");
else
print("-1");
if(g < row && g >= 0 && h < colum && h >= 0)
print("0");
else
print("-1");
}
private static void print(String str) {
System.out.println(str);
}
}
二维数组操作
最新推荐文章于 2021-02-03 10:26:10 发布