#include<bits/stdc++.h> #define LL long long #define LLL __int128 #define uint unsigned #define ldb long double #define uLL unsigned long long using namespace std; int SA,SB,A[18],B[18];vector<int>CA(11),CB(11); signed main(){ cin.tie(0)->sync_with_stdio(0); for(int i=0;i<18;++i)cin>>A[i],SA+=A[i],++CA[10-A[i]]; for(int i=0;i<18;++i)cin>>B[i],SB+=B[i],++CB[10-B[i]]; if(SA!=SB)cout<<(SA>SB?"Algosia":"Bajtek"); else if(CA!=CB)cout<<(CA>CB?"Algosia":"Bajtek"); else cout<<"remis"; return 0; } /* */
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #include<bits/stdc++.h> #define LL long long #define LLL __int128 #define uint unsigned #define ldb long double #define uLL unsigned long long using namespace std; int SA,SB,A[18],B[18];vector<int>CA(11),CB(11); signed main(){ cin.tie(0)->sync_with_stdio(0); for(int i=0;i<18;++i)cin>>A[i],SA+=A[i],++CA[10-A[i]]; for(int i=0;i<18;++i)cin>>B[i],SB+=B[i],++CB[10-B[i]]; if(SA!=SB)cout<<(SA>SB?"Algosia":"Bajtek"); else if(CA!=CB)cout<<(CA>CB?"Algosia":"Bajtek"); else cout<<"remis"; return 0; } /* */ |