#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
using namespace std;
typedef long long ll;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
vector<vector<int>> tab(2, vector<int>(12, 0));
for(int i = 0; i < 2; i++)
{
for(int j = 0; j < 18; j++)
{
int tmp;
cin >> tmp;
tab[i][11] += tmp;
tab[i][tmp]++;
}
}
for(int i = 11; i >=0; i--)
{
if(tab[0][i] > tab[1][i])
{
cout << "Algosia\n";
return 0;
}
else if(tab[0][i] < tab[1][i])
{
cout << "Bajtek\n";
return 0;
}
}
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 38 39 40 | #include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <string> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(0); vector<vector<int>> tab(2, vector<int>(12, 0)); for(int i = 0; i < 2; i++) { for(int j = 0; j < 18; j++) { int tmp; cin >> tmp; tab[i][11] += tmp; tab[i][tmp]++; } } for(int i = 11; i >=0; i--) { if(tab[0][i] > tab[1][i]) { cout << "Algosia\n"; return 0; } else if(tab[0][i] < tab[1][i]) { cout << "Bajtek\n"; return 0; } } cout << "remis\n"; } |
English