思维题 URAL 1409 Two Gangsters
2015-07-18 16:40
204 查看
题目传送门
/* 思维题:注意题目一句话:At some moment it happened so that they shot one and the same can. 如果两个人都有射中的话,肯定一个can同时被打中 */ #include <bits/stdc++.h> using namespace std; int main(void) //URAL 1409 Two Gangsters { int a, b; while (cin >> a >> b) { if (a && b) cout << b - 1 << " " << a - 1 << endl; else cout << b << " " << a << endl; } return 0; }
相关文章推荐
- Python装饰器
- MATLAB 2015 自带toolbox 列表
- rownum用法详解
- PAT乙级 1014. 福尔摩斯的约会
- Override和Overload的区别
- Git详解之三 Git分支
- android studio使用git的部分注意事项
- scala(1)
- 谈谈跨域那些事
- Android开发之PackageManager类
- JAVA基础 - 数组中有没有length()这个方法?String中有没有 length()这个方法?
- 237-e-Delete Node in a Linked List
- [转]java中byte转换int时为何与0xff进行与运算
- 时间递归神经网络LSTM(Long-Short Term Memory)
- 全排列系列
- Sql server2012连接Sql server 2008时出现的问题:已成功与服务器建立连接,但在登陆过程中发生错误。(provider:SSL Provider,error:0-接收到的消息异
- 安卓MP3播放器开发实例(2)之音乐播放
- 用 snprintf / asprintf 取代不安全的 sprintf
- 浅拷贝和深拷贝
- JAVA基础 - 逻辑与&&和按位与&的区别