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
38
#include <iostream>
#include <vector>

using namespace std;

#define NUM_TASKS 18
#define A "Algosia"
#define B "Bajtek"

int main() {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(NULL);
    vector<uint8_t> a(12), b(12);
    uint32_t temp;
    for (int i = 0; i < NUM_TASKS; ++i) {
        cin >> temp;
        a[temp]++;
        a[11] += temp;
    }
    for (int i = 0; i < NUM_TASKS; ++i) {
        cin >> temp;
        b[temp]++;
        b[11] += temp;
    }

    for (int i = 11; i > 0; --i) {
        if (a[i] > b[i]) {
            cout << A;
            return 0;
        } else if (a[i] < b[i]) {
            cout << B;
            return 0;
        }
    }
    cout << "remis";

    return 0;
}