http://codeforces.com/contest/336/problem/A

cf A. Vasily the Bear and Triangle_编程cf A. Vasily the Bear and Triangle_编程_02
 1 #include <cstdio>
 2 #include <cstring>
 3 #include <algorithm>
 4 using namespace std;
 5 
 6 int main()
 7 {
 8     int x,y;
 9     scanf("%d%d",&x,&y);
10     if(x>=0&&y>=0)
11     {
12         printf("%d %d %d %d\n",0,y+x,y+x,0);
13     }
14     else if(x<0&&y>0)
15     {
16         printf("%d %d %d %d\n",x-y,0,0,y-x);
17     }
18     else if(x<0&&y<0)
19     {
20         printf("%d %d %d %d\n",x+y,0,0,x+y);
21     }
22     else if(x>0&&y<0)
23     {
24         printf("%d %d %d %d\n",0,y-x,x-y,0);
25     }
26     return 0;
27 }
View Code