这题仔细想想就能想出来。
代码如下:
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
using namespace std;
int main(){
freopen("anniversary.in", "r", stdin); //注意文件输入输出
freopen("anniversary.out", "w", stdout);
int w, h;
scanf("%d%d", &w, &h);
int x1, y1, x2, y2;
scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
if(x1 == x2){
printf("0 %d %d %d", y1, w, y2);
}
else if(y1 == y2){
printf("%d 0 %d %d", x1, x2, h);
}
else{
printf("%d %d %d %d", x1, 0, x2, h);
}
return 0;
}