#include<iostream>
#include<vector>
using namespace std;
int main()
{
vector<int> punkty_algosia;
punkty_algosia.resize(11);
vector<int> punkty_bajtek;
punkty_bajtek.resize(11);
int suma_algosia=0,suma_bajtek=0;
for(int i=0;i<18;i++)
{
int liczba_punktow;
cin>>liczba_punktow;
punkty_algosia[liczba_punktow]++;
suma_algosia+=liczba_punktow;
}
for(int i=0;i<18;i++)
{
int liczba_punktow;
cin>>liczba_punktow;
punkty_bajtek[liczba_punktow]++;
suma_bajtek+=liczba_punktow;
}
if(suma_algosia>suma_bajtek)
{
cout<<"Algosia";
}
else if(suma_algosia<suma_bajtek)
{
cout<<"Bajtek";
}
else if(suma_algosia==suma_bajtek)
{
bool remis=true;
int counter_of_Points=10;
while(remis)
{
if(punkty_algosia[counter_of_Points]!=punkty_bajtek[counter_of_Points])
{
remis=false;
if(punkty_algosia[counter_of_Points]>punkty_bajtek[counter_of_Points])
{
cout<<"Algosia";
}
else
{
cout<<"Bajtek";
}
}
else if(counter_of_Points==0)
{
remis=false;
cout<<"remis";
}
else
{
counter_of_Points--;
}
}
}
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 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 68 69 70 71 72 73 74 | #include<iostream> #include<vector> using namespace std; int main() { vector<int> punkty_algosia; punkty_algosia.resize(11); vector<int> punkty_bajtek; punkty_bajtek.resize(11); int suma_algosia=0,suma_bajtek=0; for(int i=0;i<18;i++) { int liczba_punktow; cin>>liczba_punktow; punkty_algosia[liczba_punktow]++; suma_algosia+=liczba_punktow; } for(int i=0;i<18;i++) { int liczba_punktow; cin>>liczba_punktow; punkty_bajtek[liczba_punktow]++; suma_bajtek+=liczba_punktow; } if(suma_algosia>suma_bajtek) { cout<<"Algosia"; } else if(suma_algosia<suma_bajtek) { cout<<"Bajtek"; } else if(suma_algosia==suma_bajtek) { bool remis=true; int counter_of_Points=10; while(remis) { if(punkty_algosia[counter_of_Points]!=punkty_bajtek[counter_of_Points]) { remis=false; if(punkty_algosia[counter_of_Points]>punkty_bajtek[counter_of_Points]) { cout<<"Algosia"; } else { cout<<"Bajtek"; } } else if(counter_of_Points==0) { remis=false; cout<<"remis"; } else { counter_of_Points--; } } } else { cout<<"remis"; } return 0; } |
English