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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include <iostream>

using namespace std;

int t1[18], t2[18], s1, s2, a=0, b=0, p=0, r=0;
int main()
{
    for(int i=0; i<18; i++)
    {
        cin>>t1[i];
    }

    for(int i=0; i<18; i++)
    {
        cin>>t2[i];
    }
     for(int i=0; i<18; i++)
    {
        a=t1[i];
        s1=s1+a;
    }
    for(int i=0; i<18; i++)
    {
        b=t2[i];
        s2=s2+b;
    }

    if(s1>s2)
        {
        cout<<"Bajtus"<<endl;
        }
    if(s2>s1)
        {
        cout<<"Algosia"<<endl;
        }
    else
    {
        for(int i=0; i<18; i++)
        {
            if(t1[i]>t2[i])
            {
             p++;
            }
            if(t1[i]<t2[i])
            {
             r++;
            }
            if(t1[i]=t2[i])
            {
             r++;
             p++;
            }
        }
    }

    if(p>r)
    {
        cout<<"Bajtus"<<endl;
    }
    if(r>p)
    {
        cout<<"Algusia"<<endl;
    }
    else cout<<"remis"<<endl;

    return 0;
}