思维题 URAL 1409 Two Gangsters

 

题目传送门

 1 /*  2  思维题:注意题目一句话:At some moment it happened so that they shot one and the same can.  3  如果两个人都有射中的话,肯定一个can同时被打中  4 */  5 #include <bits/stdc++.h>  6 using namespace std;  7  8 int main(void) //URAL 1409 Two Gangsters  9 { 10 int a, b; 11 while (cin >> a >> b) 12  { 13 if (a && b) cout << b - 1 << " " << a - 1 << endl; 14 else cout << b << " " << a << endl; 15  } 16 17 return 0; 18 }

 

你可能感兴趣的:(思维)