Guest User

Untitled

a guest
Jul 17th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n, i, x;
  6. char t;
  7. char s[5] = "SHCD";
  8. bool c[4][13];
  9. cin >> n;
  10. for(i=0; i < n; i++) {
  11. cin >> t >> x;
  12. if(x > 13) continue;
  13. switch(t) {
  14. case 'S':
  15. c[0][x-1] = true;
  16. break;
  17. case 'H':
  18. c[1][x-1] = true;
  19. break;
  20. case 'C':
  21. c[2][x-1] = true;
  22. break;
  23. case 'D':
  24. c[3][x-1] = true;
  25. break;
  26. }
  27. }
  28. for(i=0; i < 4; i++) {
  29. for(x=0; x < 13; x++) {
  30. if(!c[i][x]) {
  31. if(i > 4) { i = 4; }
  32. cout << s[i] << ' ' << x+1 << endl;
  33. }
  34. }
  35. }
  36. return 0;
  37. }
Add Comment
Please, Sign In to add comment