#include <iostream>
struct wyn
{
int s;
int tab[11];
auto operator<=>(const wyn&) const = default;
};
wyn A, B;
int main()
{
std::ios_base::sync_with_stdio(0);
std::cin.tie(0);
for (int i = 0; i < 18; ++i)
{
int a;
std::cin >> a;
A.s += a;
++A.tab[10 - a];
}
for (int i = 0; i < 18; ++i)
{
int b;
std::cin >> b;
B.s += b;
++B.tab[10 - b];
}
if (A > B)
std::cout << "Algosia\n";
else if (B > A)
std::cout << "Bajtek\n";
else
std::cout << "remis\n";
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #include <iostream> struct wyn { int s; int tab[11]; auto operator<=>(const wyn&) const = default; }; wyn A, B; int main() { std::ios_base::sync_with_stdio(0); std::cin.tie(0); for (int i = 0; i < 18; ++i) { int a; std::cin >> a; A.s += a; ++A.tab[10 - a]; } for (int i = 0; i < 18; ++i) { int b; std::cin >> b; B.s += b; ++B.tab[10 - b]; } if (A > B) std::cout << "Algosia\n"; else if (B > A) std::cout << "Bajtek\n"; else std::cout << "remis\n"; } |
English