#include <iostream>
int tab[11][2];
int s[2];
int a, i, j;
int main()
{
    std::ios_base::sync_with_stdio(0);
    std::cin.tie(0);
    
    for (j = 0; j < 2; j++)
    for (i = 0; i < 18; i++)
    {
        std::cin >> a;
        tab[a][j]++;
        s[j] += a;
    }
    
    if (s[0] > s[1]) { std::cout << "Algosia"; return 0; }
    if (s[1] > s[0]) { std::cout << "Bajtek"; return 0; }
    for (int i = 10; i >= 0; i--)
    {
        if (tab[i][0] > tab[i][1]) { std::cout << "Algosia"; return 0; }
        if (tab[i][1] > tab[i][0]) { std::cout << "Bajtek"; return 0; }
    }
    std::cout << "remis";
    return 0;
}
        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  | #include <iostream> int tab[11][2]; int s[2]; int a, i, j; int main() { std::ios_base::sync_with_stdio(0); std::cin.tie(0); for (j = 0; j < 2; j++) for (i = 0; i < 18; i++) { std::cin >> a; tab[a][j]++; s[j] += a; } if (s[0] > s[1]) { std::cout << "Algosia"; return 0; } if (s[1] > s[0]) { std::cout << "Bajtek"; return 0; } for (int i = 10; i >= 0; i--) { if (tab[i][0] > tab[i][1]) { std::cout << "Algosia"; return 0; } if (tab[i][1] > tab[i][0]) { std::cout << "Bajtek"; return 0; } } std::cout << "remis"; return 0; }  | 
            
        
                    English