mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-23 20:28:48 +00:00
763. 循环相克令
https://www.acwing.com/problem/content/submission/code_detail/6942919/
This commit is contained in:
parent
7f1abb0726
commit
47073aef3b
22
AcWing/763/763.cpp
Normal file
22
AcWing/763/763.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
int t;
|
||||
cin >> t;
|
||||
while (t--) {
|
||||
string a, b;
|
||||
cin >> a >> b;
|
||||
int as = a.size();
|
||||
int bs = b.size();
|
||||
if (as - bs == 3 || as - bs == -1 || as - bs == -2) {
|
||||
cout << "Player1" << endl;
|
||||
} else if (a == b) {
|
||||
cout << "Tie" << endl;
|
||||
} else {
|
||||
cout << "Player2" << endl;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user