0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-30 16:36:26 +00:00

A - Game with Cards

https://codeforces.com/contest/1681/submission/158159185
This commit is contained in:
Baoshuo Ren 2022-05-23 22:46:19 +08:00
parent 23271050c2
commit a92e2474ba
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

47
Codeforces/1681/A/A.cpp Normal file
View File

@ -0,0 +1,47 @@
#include <iostream>
using std::cin;
using std::cout;
const char endl = '\n';
const int N = 55;
int t, n, m;
int main() {
std::ios::sync_with_stdio(false);
cin >> t;
while (t--) {
int x1 = 0, x2 = 0;
cin >> n;
for (int i = 1, x; i <= n; i++) {
cin >> x;
x1 = std::max(x, x1);
}
cin >> m;
for (int i = 1, x; i <= m; i++) {
cin >> x;
x2 = std::max(x, x2);
}
if (x1 > x2) {
cout << "Alice" << endl
<< "Alice" << endl;
} else if (x1 < x2) {
cout << "Bob" << endl
<< "Bob" << endl;
} else {
cout << "Alice" << endl
<< "Bob" << endl;
}
}
return 0;
}