Codeforces 1455C. Ping-pong
題目傳送門:
Educational Codeforces Round 99 (Rated for Div. 2)
乍一看,哇要搞博弈,然後一看樣例我就覺得不對勁了.這不就是讓自己體力先到0再換對面到0嘛.
愛麗絲先發球所以她體力可以視為輸入值自減1.那麼問題結束了,輸出他們體力即可…居然還有這種水題我是沒有想到的.
AC程式碼如下:
#include<iostream>
using namespace std;
int main()
{
int t,a,b;
cin >>t;
while(t--)
{
cin >> a >> b;
cout << a-1 << " " << b << endl;
}
}
AC截圖:
相關文章
- Codeforces
- codeforces Mafia
- codeforces Winner
- codeforces Educational Codeforces Round 33 (Rated for Div. 2)
- 【CodeForces訓練記錄】Codeforces Global Round 27
- codeforces Educational Codeforces Round 33 (Rated for Div. 2)B
- codeforces Photo of The Sky
- Codeforces - Jzzhu and Numbers
- codeforces #442 B
- Codeforces Sereja and Array
- Codeforces Round #174
- Codeforces Round #170
- Codeforces Round 955
- Codeforces 專區
- 9.11 codeforces
- codeforces 11/10
- 【CodeForces訓練記錄】Codeforces Round 981 (Div. 3)
- 【CodeForces訓練記錄】Codeforces Round 982 (Div. 2)
- 【CodeForces訓練記錄】Codeforces Round 984 (Div. 3)
- 【CodeForces訓練記錄】Codeforces Round 986 (Div. 2)
- Codeforces Global Round 13
- codeforces_B. Barnicle
- CodeForces 1307
- CodeForces - 1363B
- Educational Codeforces Round 32
- Codeforces Beta Round #32
- Codeforces Beta Round #23
- Codeforces Round #180
- Codeforces Global Round 26
- Codeforces Global Round 27
- CodeForces - 765F
- Codeforces 983 A-E
- Codeforces ICPC那場
- 【CodeForces訓練記錄VP】Codeforces Round 933 (Div. 3)
- 【CodeForces訓練記錄】Educational Codeforces Round 171 (Rated for Div. 2)
- codeforces比賽日記
- Codeforces Educational Round#98 A
- codeforces #313(div 2)