您的位置:首页 > 其它

Codeforces 336A【 Vasily the Bear and Triangle 】

2013-08-14 12:06 375 查看
开始做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;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  codeforces