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 ...
随机推荐
- LINQ to SQL和Entity Framework对比与关联 (转载)
LINQ to SQL和Entity Framework对比与关联 LINQ to SQL和Entity Framework都是一种包含LINQ功能的对象关系映射技术.他们之间的本质区别在 ...
- linux下java调用.so动态库方法2: JNA
摘自:http://blog.csdn.net/todorovchen/article/details/21319033 另请参见: http://blog.sina.com.cn/s/blog_8c ...
- OpenCV MFC 模块间通信
1. 新建MFC项目 点击完成. 2. 添加按钮 在"工具箱"中找到"Button"控件,添加至界面: 2. 配置opencv, 添加colordetecto ...
- SQL Server 数据库定时自动备份【转】
在SQL Server中出于数据安全的考虑,所以需要定期的备份数据库.而备份数据库一般又是在凌晨时间基本没有数据库操作的时候进行,所以我们不可能要求管理员每天守到晚上1点去备份数据库.要实现数据库的定 ...
- C/C++中经常使用的字符串处理函数和内存字符串函数
一. 字符处理函数 1. 字符处理函数:<ctype.h> int isdigit(int ch) ;//是否为数字,即ch是否是0-9中的字符 int ...
- module require区别
LUA modue require package 区别 2011-01-19 12:41:35| 分类: 默认分类 | 标签:lua package module require 加载 ...
- HexColor
// // HexColor.swift // HexColor // // Created by Tuomas Artman on 1.9.2014. // Copyright (c) 2014 T ...
- oracle linux 安装过程错误 :Error in invoking target ‘agent nmhs’ of makefile
Problem:When installing 11.2.0.4 on Redhat 7: Error in invoking target 'agent nmhs' of makefile '/u0 ...
- ECSHOP首页站内快讯在哪里添加和修改?
“添加新闻后在首页站内快讯处显示不出来?”.“请问首页中站内快讯(最新文章)在后台哪个位置管理”.“如何让发布的文章进入首页站内快讯”等等诸如此类的问题,经常在论坛里看到一些朋友在询问. 本ECSHO ...
- LINQ 操作符(二)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...