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:
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-336A-Vasily the Bear and Triangle
- cf A. Vasily the Bear and Triangle
- CodeForces #195 Div.2-A. Vasily the Bear and Triangle
- Codeforces Round #195 (Div. 2) A Vasily the Bear and Triangle
- CF#195(div2) A:Vasily the Bear and Triangle
- Codeforces Round #195 (Div. 2) A. Vasily the Bear and Triangle
- A. Vasily the Bear and Triangle
- [Codeforces Round #195 (Div. 2)] A. Vasily the Bear and Triangle
- Codeforces Round #195 (Div. 2) C--Vasily the Bear and Sequence(贪心)
- CF#195(div2) B:Vasily the Bear and Fly
- cf B. Vasily the Bear and Fly
- [Codeforces Round #195 DIV2E (CF336E)] Vasily the Bear and Painting Square
- [Codeforces Round #195 DIV2B (CF336B)] Vasily the Bear and Fly
- Codeforces Round #195 (Div. 2) B. Vasily the Bear and Fly - 找规律
- Codeforces Round #195 (Div. 2) D题Vasily the Bear and Beautiful Strings
- [Codeforces Round #195 DIV2D (CF336D)] Vasily the Bear and Beautiful Strings
- Codeforces 385 C Bear and Prime Numbers
- 【CodeForces】679 A. Bear and Prime 100
- Codeforces 385C Bear and Prime Numbers 筛法
- codeforces 658B B. Bear and Displayed Friends(优先队列)