#include <bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;
using ld = long double;
//#define int ll
#define sz(x) ((int)(x).size())
using pii = pair<int,int>;
using tii = tuple<int,int,int>;
signed main() {
cin.tie(0) -> sync_with_stdio(0);
vector<int> a(18), b(18);
for(auto &x : a) cin >> x;
for(auto &x : b) cin >> x;
sort(all(a), greater<int>());
sort(all(b), greater<int>());
if(accumulate(all(a), 0) > accumulate(all(b), 0)) {
cout << "Algosia\n";
return 0;
}
if(accumulate(all(b), 0) > accumulate(all(a), 0)) {
cout << "Bajtek\n";
return 0;
}
if(b > a) {
cout << "Bajtek\n";
return 0;
}
if(a > b) {
cout << "Algosia\n";
return 0;
}
cout << "remis\n";
}
/**
Anul asta nu se da centroid
-- Rugaciunile mele
*/
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 | #include <bits/stdc++.h> #define all(x) (x).begin(),(x).end() using namespace std; using ll = long long; using ld = long double; //#define int ll #define sz(x) ((int)(x).size()) using pii = pair<int,int>; using tii = tuple<int,int,int>; signed main() { cin.tie(0) -> sync_with_stdio(0); vector<int> a(18), b(18); for(auto &x : a) cin >> x; for(auto &x : b) cin >> x; sort(all(a), greater<int>()); sort(all(b), greater<int>()); if(accumulate(all(a), 0) > accumulate(all(b), 0)) { cout << "Algosia\n"; return 0; } if(accumulate(all(b), 0) > accumulate(all(a), 0)) { cout << "Bajtek\n"; return 0; } if(b > a) { cout << "Bajtek\n"; return 0; } if(a > b) { cout << "Algosia\n"; return 0; } cout << "remis\n"; } /** Anul asta nu se da centroid -- Rugaciunile mele */ |
English