开始做CF了,第一篇解题报告。
Problems:
http://codeforces.com/problemset/problem/336/A
Round #195 Div.2的A题, 按照四个象限讨论一下即可
tag:数学
空间复杂度:O(1)
时间复杂度:O(1)
code:
#include<iostream>
#include<cstdio>
using namespace std;
int x,y;
int main()
{
cin>>x>>y;
if (x>0)
{
if (y>0)
printf("0 %d %d 0\n",y+x,y+x);
else
printf("0 %d %d 0\n",y-x,x-y);
}
else
{
if (y>0)
printf("%d 0 0 %d\n",x-y,y-x);
else
printf("%d 0 0 %d\n",x+y,x+y);
}
return 0;
}