Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int n, i, x;
- char t;
- char s[5] = "SHCD";
- bool c[4][13];
- cin >> n;
- for(i=0; i < n; i++) {
- cin >> t >> x;
- if(x > 13) continue;
- switch(t) {
- case 'S':
- c[0][x-1] = true;
- break;
- case 'H':
- c[1][x-1] = true;
- break;
- case 'C':
- c[2][x-1] = true;
- break;
- case 'D':
- c[3][x-1] = true;
- break;
- }
- }
- for(i=0; i < 4; i++) {
- for(x=0; x < 13; x++) {
- if(!c[i][x]) {
- if(i > 4) { i = 4; }
- cout << s[i] << ' ' << x+1 << endl;
- }
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment