#include <iostream>
using namespace std;
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <set>
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
vector <int> punkty1,punkty2;
int punkt;
for(int i = 0; i<18; i++)
cin >> punkt;
punkty1.push_back(punkt);
sort(punkty1.begin(),punkty1.end());
for(int i = 0; i<18; i++){
cin >> punkt;
punkty2.push_back(punkt);
sort(punkty2.begin(),punkty2.end());
}
for(int i = 0; i<18; i++){
if(punkty1[i] > punkty2[i]){
cout << "Algosia";
return 0;
}
else{
if(punkty2[i] > punkty1[i]){
cout << "Bajtek";
return 0;
}
}
}
cout << "remisc";
return 0;
}
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> using namespace std; #include <vector> #include <algorithm> #include <map> #include <string> #include <set> int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); vector <int> punkty1,punkty2; int punkt; for(int i = 0; i<18; i++) cin >> punkt; punkty1.push_back(punkt); sort(punkty1.begin(),punkty1.end()); for(int i = 0; i<18; i++){ cin >> punkt; punkty2.push_back(punkt); sort(punkty2.begin(),punkty2.end()); } for(int i = 0; i<18; i++){ if(punkty1[i] > punkty2[i]){ cout << "Algosia"; return 0; } else{ if(punkty2[i] > punkty1[i]){ cout << "Bajtek"; return 0; } } } cout << "remisc"; return 0; } |
English