Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #define f first
  3. #define s second
  4. #define mp make_pair
  5. #define pb push_back
  6. #define ll long long
  7. #define MOD 1000000007
  8. #define dbg(VAR) cerr << #VAR << " = " << (VAR) << endl;
  9.  
  10. using namespace std;
  11.  
  12. int n, ans;
  13. char ch;
  14. string x;
  15.  
  16. int main()
  17. {
  18. ios_base::sync_with_stdio(0);
  19. cin.tie(0);
  20. cin >> n >> ch;
  21. n *= 4;
  22. while(n--) {
  23. cin >> x;
  24. if (x[1] == ch) {
  25. if (x[0] == 'A') ans += 11;
  26. if (x[0] == 'K') ans += 4;
  27. if (x[0] == 'Q') ans += 3;
  28. if (x[0] == 'J') ans += 20;
  29. if (x[0] == 'T') ans += 10;
  30. if (x[0] == '9') ans += 14;
  31. }
  32. else {
  33. if (x[0] == 'A') ans += 11;
  34. if (x[0] == 'K') ans += 4;
  35. if (x[0] == 'Q') ans += 3;
  36. if (x[0] == 'J') ans += 2;
  37. if (x[0] == 'T') ans += 10;
  38. }
  39. }
  40. cout << ans << endl;
  41.  
  42. return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement