hdu1194-Beat the Spread!
来源:互联网 发布:易企秀免费下载 mac 编辑:程序博客网 时间:2024/05/21 17:20
http://acm.hdu.edu.cn/showproblem.php?pid=1194
理解题意
#include<iostream>#include<cstring>#include<cstdio>using namespace std ;int main(){int Case ;int m , n;int a , b ; cin >> Case ;while( Case-- ){cin >> m >> n ;if( m < n )cout << "impossible" << endl ;else if( ( m + n ) % 2 != 0)cout << "impossible" << endl ;else{a = ( m + n ) / 2 ;b = ( m - n ) / 2 ;if( a < b )int t = a , a = b , b = t ;cout << a << " " << b << endl ; }}return 0 ;}
- HDU1194:Beat the Spread!
- hdu1194-Beat the Spread!
- hdu1194 Beat the Spread!
- HDU1194 POJ2301 UVA10812 ZOJ2388 Beat the Spread!【数学+水题】
- Beat the Spread!
- Beat the Spread! (P2301)
- zoj2388----------------Beat the Spread!
- 10812 - Beat the Spread!
- zoj_2388 Beat the Spread!
- zoj Beat the Spread!
- zoj2388 Beat the Spread!
- Beat the Spread!
- Beat the Spread!
- 1194:Beat the Spread!
- 1194 Beat the Spread!
- [1194]:Beat the Spread!
- ZOJ2388 Beat the Spread!
- ZOJ2388-Beat the Spread!
- boost 迭代器概述
- boost 算法概述
- exec函数
- InnoDB 主键的选择:自增ID & 业务ID
- VS C#程序打包覆盖安装不能更新的解决方法
- hdu1194-Beat the Spread!
- 线段树或树状数组求逆序数
- 【异常】Android中使用localhost:8080或者172.0.0.1:8080访问本地服务器org.apache.http.conn.HttpHostConnectException异常
- 局部特征(1)——入门篇
- boost 函数对象和高阶编程概述
- Java命令行运行参数说明大全
- boost 泛型编程库概述
- Python之道–实例和类的继承以及运算符重载
- boost 模板元编程概述