poj2301
| Time Limit: 1000MS | Memory Limit: 65536K | |
| Total Submissions: 17794 | Accepted: 8484 |
Description
Given the winning numbers for each type of bet, can you deduce the final scores?
Input
Output
Sample Input
2
40 20
20 40
Sample Output
30 10
impossible
Source
#include<iostream>
#include<cstdio>
using namespace std; int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
int x,y;
for(int i= ;i<n;i++)
{
scanf("%d%d",&x,&y);
if(x<y||x%==&&y%!=||x%!=&&y%==)
printf("impossible\n");
else
{
int larger = (x+y)/;
int litter = x-larger;
printf("%d %d\n",larger,litter);
}
}
}
return ;
}
poj2301的更多相关文章
- POJ2301+水~~~~~~
有比这更水的么.............. #include<stdio.h> int main(){ int n; scanf("%d",&n); while ...
随机推荐
- 浅析busybox-1.12.0中ash的脚本命令局限性
浅析busybox-1.12.0中ash的脚本命令局限性 LUTHER= 表示将LUTHER清空,将其变为null echo ${LUTHER:-111}如果执行该句之前LUTHER变量不存在,那么显 ...
- css案例学习之用thead、tbody、tfoot实现漂亮的table布局
首先说说thead.tbody.tfoot <thead> <tbody> <tfoot> 无论前后顺序如何改变, <thead> 内的元素总是在表的最 ...
- location.href IE6 下不起作用的罪魁祸首
解决问题 在btn_publish函数内逻辑最后面加:return false;
- Container With Most Water 解答
Question Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate ...
- HDOJ-1012 u Calculate e(水)
http://acm.hdu.edu.cn/showproblem.php?pid=1012 简单套公式 # include <stdio.h> double Factorial(doub ...
- Linux NFS服务器的安装与配置(转载)
一.NFS服务简介 NFS 是Network File System的缩写,即网络文件系统.一种使用于分散式文件系统的协定,由Sun公司开发,于1984年向外公布.功能是通过网络让不同的机器.不同的操 ...
- android ANR 案例分析
案例1:关键词:ContentResolver in AsyncTask onPostExecute, high iowait Process:com.android.email Activity:c ...
- 执行此安装程序之前,必须安装 32 位 Windows 映像处理组件(WIC)解决的方法
我们在Windows Service 2003上安装 Microsoft .NET Framework4.0时常常出现以下的报错 执行此安装程序之前,必须安装 32 位 Windows 映像处理组件( ...
- 修改vim中的tab为4个空格
记录一下,避免用时还得搜........ 1.临时修改 在vi中,set tabstop=4 或 set ts=4 2.永久修改 vi --version 查看要修改的文件 如果是vim的话,修改~/ ...
- asp.net + Jquery 实现类似Gridview功能 (一)
不知不觉2015年就过去一半了,由于过年前后公司人员陆续离职(这个...),项目忙不过来,从过年来上班就一直在忙,最近项目终于告一段落,开始步入正轨(不用天天赶项目了).所以最近才有时间写这个东西,可 ...