Guest User

Untitled

a guest
May 21st, 2017
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. ios::sync_with_stdio(false);
  7. int t;
  8. cin >> t;
  9. while (t --){
  10. int barca, real, mal, eib;
  11. for (int i = 0; i < 4; i++){
  12. int x;
  13. string s;
  14. cin >> s >> x;
  15. if (s == "Barcelona") barca = x;
  16. if (s == "RealMadrid") real = x;
  17. if (s == "Malaga") mal = x;
  18. if (s == "Eibar") eib = x;
  19. }
  20. if (barca > eib and real < mal) cout << "Barcelona\n";
  21. else cout << "RealMadrid\n";
  22. }
  23. }
Add Comment
Please, Sign In to add comment