水题,注意数据范围即可
#include#include #include using namespace std;typedef pair Point;int main(){ int x,y; cin >> x >>y; Point a,b; if((x>0 && y > 0) || (x < 0 && y < 0)) a = make_pair(x+y,0),b=make_pair(0,x+y); else a = make_pair(x-y,0),b=make_pair(0,y-x); if(a.first > b.first) swap(a,b); cout< <<" "< <<" "< <<" "< <