fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int j=0;
  7. int e=0;
  8. int jj, ee;
  9. int pocet,aktualna;
  10. cin >> jj >> ee;
  11. cin >> pocet;
  12. for (int i=0; i < pocet; i++)
  13. {
  14. cin >> aktualna;
  15. if (aktualna == jj)
  16. j++;
  17. if (aktualna == ee)
  18. e +=1;
  19.  
  20. // cout << j << " "<< e << endl;
  21. }
  22. if (e > j)
  23. cout << "Ema" << endl;
  24. if (j > e)
  25. cout << "Jergus" << endl;
  26. if (j == e)
  27. cout << "remiza" << endl;
  28. return 0;
  29.  
  30.  
  31. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
remiza