题目大意:知道一场橄榄球比赛比分的和以及差的绝对值,算出这两个数。注意判断结果的可能性(比分为非负数)。

 #include <cstdio>

 int main()
{
#ifdef LOCAL
freopen("in", "r", stdin);
#endif
int n;
scanf("%d", &n);
int s, d, a, b;
while (n--)
{
scanf("%d%d", &s, &d);
if (s < d || (s+d)%)
{
printf("impossible\n");
continue;
}
a = (s+d) / ;
b = s - a;
printf("%d %d\n", a, b);
}
return ;
}

UVa 10812 - Beat the Spread!的更多相关文章

  1. Beat the Spread![HDU1194]

    Beat the Spread! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  2. ZOJ2388 Beat the Spread! 2017-04-16 19:18 91人阅读 评论(0) 收藏

    Beat the Spread! Time Limit: 2 Seconds      Memory Limit: 65536 KB Superbowl Sunday is nearly here. ...

  3. zoj 2388 Beat the Spread!

    Beat the Spread! Time Limit: 2 Seconds      Memory Limit: 65536 KB Superbowl Sunday is nearly here. ...

  4. HDOJ 1194 Beat the Spread!(简单题)

    Problem Description Superbowl Sunday is nearly here. In order to pass the time waiting for the half- ...

  5. HDU 1194 - Beat the Spread!

    给两数之和和两数之差,求两数,两数还必须同奇偶 #include <iostream> using namespace std; int main() { int a,b,t; cin&g ...

  6. HDU1194_Beat the Spread!

    Beat the Spread! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  7. ACM学习

    转:ACM大量习题题库   ACM大量习题题库 现在网上有许多题库,大多是可以在线评测,所以叫做Online Judge.除了USACO是为IOI准备外,其余几乎全部是大学的ACM竞赛题库.   US ...

  8. (转载)ACM训练计划,先过一遍基础再按此拼搏吧!!!!

    ACM大量习题题库 ACM大量习题题库 现在网上有许多题库,大多是可以在线评测,所以叫做Online Judge.除了USACO是为IOI准备外,其余几乎全部是大学的ACM竞赛题库. USACO ht ...

  9. POJ 题目分类(转载)

    Log 2016-3-21 网上找的POJ分类,来源已经不清楚了.百度能百度到一大把.贴一份在博客上,鞭策自己刷题,不能偷懒!! 初期: 一.基本算法: (1)枚举. (poj1753,poj2965 ...

随机推荐

  1. redis 工具类 单个redis、JedisPool 及多个redis、shardedJedisPool与spring的集成配置

    http://www.cnblogs.com/edisonfeng/p/3571870.html http://javacrazyer.iteye.com/blog/1840161 http://ww ...

  2. L6,Percy Buttons

    expressions: knock at敲打 knock off 碰掉,I knock the vase off the table 下班,He always knocks off six o'cl ...

  3. css 内联与块

    内联元素可以理解为不能直接设置宽度和高度元素,比如span,你为他设置宽度和高度没有效果,除非你把它设置成块级元素. 如下面的代码把display:block;属性值去掉的话,宽度和高度都不会起作用了 ...

  4. sql视图

    什么是视图 大家都知道,我们国家现在“神七”上天了.从美国的月球登月开始,人类上天不再是神话.听说,在美国,你只要出几十万美元,您就可以上一次月球进行太空旅行,所以,我们相信:在不久的将来,上天旅行将 ...

  5. C#入门经典(2-重置窗体布局,界面介绍,错误列表)

  6. s-palindrome

    s-palindrome Let's call a string "s-palindrome" if it is symmetric about the middle of the ...

  7. CentOS 6.5配置mysql

    启动mysql service mysqld start 给root账号设置密码 mysqladmin -u root password '

  8. django 中文乱码问题

    在使用JS 发送ajax到django后台的时候,可能会出现中文乱码问题 解决方案: 所有的HTMl 和py文件都使用utf-8编码,在创建数据库的时候指定使用utf8 :create databas ...

  9. Codeforces Round #369 (Div. 2) C. Coloring Trees (DP)

    C. Coloring Trees time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...

  10. Sencha Touch学习(一)

    一.Ext的内部类结构示意图 基类Ext.Base 该类是所有通过Ext.define定义出来的类的基类. 是所有Ext类的基石. 来自为知笔记(Wiz)