UVa 10812 Beat the Spread! (陷阱)
2013-11-21 20:07
399 查看
10812 - Beat the Spread!
Time limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1753
蛋碎了,被水题坑到了。。
完整代码:
/*0.018s*/ #include<cstdio> int main() { int t, s, d; scanf("%d", &t); while (t--) { scanf("%d%d", &s, &d); if (s < d || (s + d) & 1) puts("impossible"); else printf("%d %d\n", (s + d) >> 1, (s - d) >> 1); } return 0; }
相关文章推荐
- HDU1194 POJ2301 UVA10812 ZOJ2388 Beat the Spread!【数学】
- UVa 10812 Beat the Spread!
- UVa 10812 - Beat the Spread!
- UVa 10812 - Beat the Spread!
- UVa 10812 - Beat the Spread!
- [结题报告]10812 - Beat the Spread! Time limit: 3.000 seconds
- 10812 - Beat the Spread!
- 10812 - Beat the Spread!
- hdu1194-Beat the Spread!
- 杭电 1194 Beat the Spread!
- 杭电 HDU 1194 Beat the Spread!
- POJ 2301 Beat the Spread!
- HDU 1194 - Beat the Spread!
- ACM HDU 1194 Beat the Spread!(简单的水题)
- 2388_Beat the Spread!(知道两数和差,求两数)
- Beat the Spread! (P2301)
- hdu 1194 Beat the Spread!
- hdu-oj 1194 Beat the Spread!
- poj 2301 Beat the Spread!
- HOJ 2100 Beat the Spread!