criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>

using namespace std;

int main() {
    int cards[4][13] = {0}, i, j, n;
    cin >> n;
    for (i = 1; i <= n; i++) {
        cin >> suit >> rank;
        switch(suit){
            case 'S' : 
                cards[0][rank-1] = 1;
                break;
            case 'H' :
                cards[1][rank-1] = 1;
                break;
            case 'C' :
                cards[2][rank-1] = 1;
                break;
            case 'D' :
                cards[3][rank-1] = 1;
                break;
        }
    }
    for(i=0;i<=3;i++) {
        for(j=0;j<=12;j++) {
            if(suit[i][j] == 0) {
                if(i == 0) cout << 'S' << " " << j+1;
                else if(i == 1) cout << 'H' << " " << j+1;
                else if(i == 2) cout << 'C' << " " << j+1;
                else            cout << 'D' << " " << j+1;
            }
            cout << endl;
        }
     }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'suit' was not declared in this scope
    9 |         cin >> suit >> rank;
      |                ^~~~
a.cc:9:28: error: missing template arguments before ';' token
    9 |         cin >> suit >> rank;
      |                            ^
a.cc:12:30: error: missing template arguments before '-' token
   12 |                 cards[0][rank-1] = 1;
      |                              ^
a.cc:15:30: error: missing template arguments before '-' token
   15 |                 cards[1][rank-1] = 1;
      |                              ^
a.cc:18:30: error: missing template arguments before '-' token
   18 |                 cards[2][rank-1] = 1;
      |                              ^
a.cc:21:30: error: missing template arguments before '-' token
   21 |                 cards[3][rank-1] = 1;
      |                              ^
a.cc:27:16: error: 'suit' was not declared in this scope
   27 |             if(suit[i][j] == 0) {
      |                ^~~~
Language: C++

#include <iostream>

using namespace std;

int main() {
    int cards[4][13] = {0}, i, j, n, suit, rank;
    cin >> n;
    for (i = 1; i <= n; i++) {
        cin >> suit >> rank;
        switch(suit){
            case 'S' : 
                cards[0][rank-1] = 1;
                break;
            case 'H' :
                cards[1][rank-1] = 1;
                break;
            case 'C' :
                cards[2][rank-1] = 1;
                break;
            case 'D' :
                cards[3][rank-1] = 1;
                break;
        }
    }
    for(i=0;i<=3;i++) {
        for(j=0;j<=12;j++) {
            if(suit[i][j] == 0) {
                if(i == 0) cout << 'S' << " " << j+1;
                else if(i == 1) cout << 'H' << " " << j+1;
                else if(i == 2) cout << 'C' << " " << j+1;
                else            cout << 'D' << " " << j+1;
            }
            cout << endl;
        }
     }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:20: error: invalid types 'int[int]' for array subscript
   27 |             if(suit[i][j] == 0) {
      |                    ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <map>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main(){
  int num;
  cin >> num;
  bool card[4][13];
  REP(i,4){
    REP(j,13){
      card[i][j]=false;
    }
  }
  char code;
  int pat,number;
  REP(i,num){
    cin >>code>>number;
    if(code=='S'){
      pat=0;
       card[pat][number-1]=true;
    }
    if(code=='H'){
      pat=1;
       card[pat][number-1]=true;
    }
    if(code=='C'){
      pat=2;
       card[pat][number-1]=true;
    }
    if(code=='D'){
      pat=3;
      card[pat][number-1]=true;
    }
  }
   REP(i,4){
    REP(j,13){
      if(card[i][j]==false){
        if(i==0)
          cout <<"S " <<j+1;
        else if(i==1)
          cout <<"H "<<j+1;
        else if(i==2)
          cout <<"C "<<j+1;
        else if(i==3)
          cout <<"D "<<j+1;
        cout <<endl;
      }
    }
  }
}
~

Compiler output:
a.cc:54:2: error: expected class-name at end of input
   54 | ~
      |  ^
Language: C++

#include <stdio.h>
#include <stdlib.h>
int main()
{
	int n;
	scanf("%d", &n");
	char* cs = (char*)malloc(sizeof(char)*n);
	int* cd= (int*)malloc(sizeof(int)*n);
	for(int i = 0; i < n; ++i)
	{
		char s;
		int d;
		scanf("%c %d", &s, &d);
		cs[i] = s;
		cd[i] = d;
	}
	
	char t[] = {'S', 'H', 'C', 'D'};
	for(int i = 0; i < 4; ++i)
	{
		for(int j = 1; j <= 13; ++j)
		{
			bool isExist = false;
			for(int k = 0; k < n; ++k)
			{
				if( cs[k] == t[i] && cd[k] == j )
				{
					isExist = true;
					break;
				}
			}
			
			if( !isExist )
			{
				printf("%c %d\n", t[i], j);
			}
		}
	}
	
	free(cs);
	free(cd);
	return 0;
}

Compiler output:
a.cc:6:23: warning: missing terminating " character
    6 |         scanf("%d", &n");
      |                       ^
a.cc:6:23: error: missing terminating " character
    6 |         scanf("%d", &n");
      |                       ^~~
a.cc: In function 'int main()':
a.cc:6:23: error: expected ')' before 'char'
    6 |         scanf("%d", &n");
      |              ~        ^
      |                       )
    7 |         char* cs = (char*)malloc(sizeof(char)*n);
      |         ~~~~           
a.cc:14:17: error: 'cs' was not declared in this scope; did you mean 's'?
   14 |                 cs[i] = s;
      |                 ^~
      |                 s
a.cc:26:37: error: 'cs' was not declared in this scope; did you mean 'cd'?
   26 |                                 if( cs[k] == t[i] && cd[k] == j )
      |                                     ^~
      |                                     cd
a.cc:40:14: error: 'cs' was not declared in this scope; did you mean 'cd'?
   40 |         free(cs);
      |              ^~
      |              cd
Language: C++

#include<iostream>
using namespace std;

int main(){
    bool card[4][13];
    int n,c,num;
    
    cin >> n;
    
    for (int i = 0; i < n; i++){
        cin >> c;
        if (c == 'S'){
            cin >> num;
            card[1][num] = True;
        } else if (c == 'H'){
            cin >> num;
            card[2][num] = True;
        } else if (c == 'C'){
            cin >> num;
            card[3][num] = True;
        } else if (c == 'D'){
            cin >> num;
            card[4][num] = True;
        }
    }
    
    for (int j = 0; j < 4; j++){
        for (int k = 0; k < 13; k++){
            if (card[j][k] == False){
                if (i == 0){
                    cout << "H" << " " << k << endl;
                } else if(i == 1){
                    cout << "S" << " " << k << endl;
                } else if(i == 2){
                    cout << "C" << " " << k << endl;
                } else if(i == 3){
                    cout << "D" << " " << k << endl;
                }
            }
        }
    }
        
    return 0;
}
        

Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: 'True' was not declared in this scope
   14 |             card[1][num] = True;
      |                            ^~~~
a.cc:17:28: error: 'True' was not declared in this scope
   17 |             card[2][num] = True;
      |                            ^~~~
a.cc:20:28: error: 'True' was not declared in this scope
   20 |             card[3][num] = True;
      |                            ^~~~
a.cc:23:28: error: 'True' was not declared in this scope
   23 |             card[4][num] = True;
      |                            ^~~~
a.cc:29:31: error: 'False' was not declared in this scope
   29 |             if (card[j][k] == False){
      |                               ^~~~~
a.cc:30:21: error: 'i' was not declared in this scope
   30 |                 if (i == 0){
      |                     ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    int card[4][13];
    int n,c,num;
    
    cin >> n;
    
    for (int i = 0; i < n; i++){
        cin >> c;
        if (c == 'S'){
            cin >> num;
            card[1][num] = 1;
        } else if (c == 'H'){
            cin >> num;
            card[2][num] = 1;
        } else if (c == 'C'){
            cin >> num;
            card[3][num] = 1;
        } else if (c == 'D'){
            cin >> num;
            card[4][num] = 1;
        }
    }
    
    for (int j = 0; j < 4; j++){
        for (int k = 0; k < 13; k++){
            if (card[j][k] == False){
                if (i == 0){
                    cout << "H" << " " << k+1 << endl;
                } else if(i == 1){
                    cout << "S" << " " << k+1 << endl;
                } else if(i == 2){
                    cout << "C" << " " << k+1 << endl;
                } else if(i == 3){
                    cout << "D" << " " << k+1 << endl;
                }
            }
        }
    }
        
    return 0;
}
        

Compiler output:
a.cc: In function 'int main()':
a.cc:29:31: error: 'False' was not declared in this scope
   29 |             if (card[j][k] == False){
      |                               ^~~~~
a.cc:30:21: error: 'i' was not declared in this scope
   30 |                 if (i == 0){
      |                     ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    char s;
    int n,c,num,card[4][13];
    
    for (int t = 0; t < 4; t++){
        for (int u = 0; u < 13; u++){
            card[t][u] = 0;
        }
    }
    
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> c >> num;
        if (c == 'S'){
            card[0][num-1] = 1;
        }
        else if (c == 'H'){
            card[1][num-1] = 1;
        } 
        else if (c == 'C'){
            card[2][num-1] = 1;
        }
        else if (c == 'D'){
            card[3][num-1] = 1;
        }
    }
    
    for (int j = 0; j < 4; j++){
        for (int k = 0; k < 13; k++){
            if (card[j][k] == 0){
                if (j==0){
                    d = "H";
                } else if(j == 1){
                    d = "S";
                } else if(j == 2){
                    d = "C";
                } else if(j == 3){
                    d = "D";
                }
                cout << d << " " << k+1 << endl;
            }
        }
    }
        
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:21: error: 'd' was not declared in this scope
   35 |                     d = "H";
      |                     ^
a.cc:37:21: error: 'd' was not declared in this scope
   37 |                     d = "S";
      |                     ^
a.cc:39:21: error: 'd' was not declared in this scope
   39 |                     d = "C";
      |                     ^
a.cc:41:21: error: 'd' was not declared in this scope
   41 |                     d = "D";
      |                     ^
a.cc:43:25: error: 'd' was not declared in this scope
   43 |                 cout << d << " " << k+1 << endl;
      |                         ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    char d;
    int n,c,num,card[4][13];
    
    for (int t = 0; t < 4; t++){
        for (int u = 0; u < 13; u++){
            card[t][u] = 0;
        }
    }
    
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> c >> num;
        if (c == 'S'){
            card[0][num-1] = 1;
        }
        else if (c == 'H'){
            card[1][num-1] = 1;
        } 
        else if (c == 'C'){
            card[2][num-1] = 1;
        }
        else if (c == 'D'){
            card[3][num-1] = 1;
        }
    }
    
    for (int j = 0; j < 4; j++){
        for (int k = 0; k < 13; k++){
            if (card[j][k] == 0){
                if (j==0){
                    d = "H";
                } else if(j == 1){
                    d = "S";
                } else if(j == 2){
                    d = "C";
                } else if(j == 3){
                    d = "D";
                }
                cout << d << " " << k+1 << endl;
            }
        }
    }
        
    return 0;
}
        

Compiler output:
a.cc: In function 'int main()':
a.cc:35:25: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   35 |                     d = "H";
      |                         ^~~
      |                         |
      |                         const char*
a.cc:37:25: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   37 |                     d = "S";
      |                         ^~~
      |                         |
      |                         const char*
a.cc:39:25: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   39 |                     d = "C";
      |                         ^~~
      |                         |
      |                         const char*
a.cc:41:25: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   41 |                     d = "D";
      |                         ^~~
      |                         |
      |                         const char*
Language: C++

#include<iostream>
using namespace std;

int main(){
    char s;
    int n,c,num,card[4][13];
    
    for (int t = 0; t < 4; t++){
        for (int u = 0; u < 13; u++){
            card[t][u] = 0;
        }
    }
    
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> c >> num;
        if (c == 'S'){
            card[0][num-1] = 1;
        }
        else if (c == 'H'){
            card[1][num-1] = 1;
        } 
        else if (c == 'C'){
            card[2][num-1] = 1;
        }
        else if (c == 'D'){
            card[3][num-1] = 1;
        }
    }
    
    for (int j = 0; j < 4; j++){
        for (int k = 0; k < 13; k++){
            if (card[j][k] == 0){
                if (j==0){
                    d = 'H';
                } else if(j == 1){
                    d = 'S';
                } else if(j == 2){
                    d = 'C';
                } else if(j == 3){
                    d = 'D';
                }
                cout << d << ' ' << k+1 << endl;
            }
        }
    }
        
    return 0;
}
        

Compiler output:
a.cc: In function 'int main()':
a.cc:35:21: error: 'd' was not declared in this scope
   35 |                     d = 'H';
      |                     ^
a.cc:37:21: error: 'd' was not declared in this scope
   37 |                     d = 'S';
      |                     ^
a.cc:39:21: error: 'd' was not declared in this scope
   39 |                     d = 'C';
      |                     ^
a.cc:41:21: error: 'd' was not declared in this scope
   41 |                     d = 'D';
      |                     ^
a.cc:43:25: error: 'd' was not declared in this scope
   43 |                 cout << d << ' ' << k+1 << endl;
      |                         ^
Language: C++

#include <stdio.h>
int main()
{
int n,p[4][13],x,cou;
cou=0;
//p[4][13]={0};
char c;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%s",&c);scanf("%d",&x);
if(c=='S'){p[0][(x-1)]=1;}
else if(c=='C'){p[1][(x-1)]=1;}
else if(c=='H'){p[2][(x-1)]=1;}
else if(c=='D'){p[3][(x-1)]=1;}
}
for(int k=0;k<4;k++){
for(int j=0;j<13;j++){
if(p[k][j]==0){
if(k=0){printf("S %d\n",p[k][j]);}
else if(k=1){printf("C %d\n",p[k][j]);}
else if(k=2){printf("H %d\n",p[k][j]);}
else if(k=3){printf("D %d\n",p[k][j]);}
}
}
}
return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:27:10: error: expected '}' at end of input
   27 | return 0;
      |          ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

#include <stdio.h>
int main()
{
int n,p[4][13],x,cou;
cou=0;
//p[4][13]={0};
char c;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%c",&c);scanf("%d",&x);
if(c=='S'){p[0][(x-1)]=1;}
else if(c=='C'){p[1][(x-1)]=1;}
else if(c=='H'){p[2][(x-1)]=1;}
else if(c=='D'){p[3][(x-1)]=1;}
}
for(int k=0;k<4;k++){
for(int j=0;j<13;j++){
if(p[k][j]==0){
if(k=0){printf("S %d\n",p[k][j]);}
else if(k=1){printf("C %d\n",p[k][j]);}
else if(k=2){printf("H %d\n",p[k][j]);}
else if(k=3){printf("D %d\n",p[k][j]);}
}
}
}
return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:27:10: error: expected '}' at end of input
   27 | return 0;
      |          ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

#include <stdio.h>
int main()
{
int n,p[4][13],x;
char c;
for(int k=0;k<4;k++){
for(int j=0;j<13;j++){
	p[k][j]=0;
}
}
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%s",&c);scanf("%d",&x);
if(c=='S'){p[0][(x-1)]=1;}
else if(c=='H'){p[1][(x-1)]=1;}
else if(c=='C'){p[2][(x-1)]=1;}
else if(c=='D'){p[3][(x-1)]=1;}
}
for(int k=0;k<4;k++){
for(int j=0;j<13;j++){
if(p[k][j]==0){
if(k==0){printf("S %d\n",j+1);}
else if(k==1){printf("H %d\n",j+1);}
else if(k==2){printf("C %d\n",j+1);}
else if(k==3){printf("D %d\n",j+1);}
}
}
}
printf("\n");javascript:void(0)
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:32: error: expected ';' before 'return'
   30 | printf("\n");javascript:void(0)
      |                                ^
      |                                ;
   31 | return 0;
      | ~~~~~~
Language: C++

#include <stdio.h>
int main()
{
int n,p[4][13],x;
char c;
for(int k=0;k<4;k++){
for(int j=0;j<13;j++){
	p[k][j]=0;
}
}
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%s %d",&c,&x);
if(c=='S'){p[0][(x-1)]=1;}
else if(c=='H'){p[1][(x-1)]=1;}
else if(c=='C'){p[2][(x-1)]=1;}
else if(c=='D'){p[3][(x-1)]=1;}
}
for(int k=0;k<4;k++){
for(int j=0;j<13;j++){
if(p[k][j]==0){
if(k==0){printf("S %d\n",(j+1));}
else if(k==1){printf("H %d\n",(j+1);}
else if(k==2){printf("C %d\n",(j+1);}
else if(k==3){printf("D %d\n",(j+1);}
}
}
}
printf("\n");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:36: error: expected ')' before ';' token
   24 | else if(k==1){printf("H %d\n",(j+1);}
      |                     ~              ^
      |                                    )
a.cc:25:36: error: expected ')' before ';' token
   25 | else if(k==2){printf("C %d\n",(j+1);}
      |                     ~              ^
      |                                    )
a.cc:26:36: error: expected ')' before ';' token
   26 | else if(k==3){printf("D %d\n",(j+1);}
      |                     ~              ^
      |                                    )
Language: C++

#include<stdio.h>
#include<stdlib.h>
int main () {
	int card[4][14];
	int cardNum;
	int number;
	char marks[4] = "SHCD";
	char mark;
	int i , s;

	for(i = 0; i < 4; i++) {
		for(s = 0; s < 14; s++) {
			card[i][s] = 0;
		}
	}
	scanf("%d" , &cardNum);
	getchar();
	for(i = 0; i < cardNum; i++) {
		scanf("%c %d" , &mark , &number);
		getchar();	
		if (mark == 'S') {
			card[0][number] = 1;
		}
		else if(mark == 'H') {
			card[1][number] = 1;
		}
		else if(mark == 'C') {
			card[2][number] = 1;
		}
		else if(mark == 'D') {
			card[3][number] = 1;
		}
	}

	for(i = 0; i < 4; i++) {
		for(s = 1; s <= 13; s++) {
			if (card[i][s] == 0) {
				printf("%c %d\n" , marks[i] , s);
			}
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: initializer-string for 'char [4]' is too long [-fpermissive]
    7 |         char marks[4] = "SHCD";
      |                         ^~~~~~
Language: C++

j=input();i=52;a=[""]*i
while i:i-=1;a[i]="SHCD"[i/13]+" "+str(i%13+1)
while j:j-=1;a.remove(raw_input())
for i in a:print i

Compiler output:
a.cc:1:1: error: 'j' does not name a type
    1 | j=input();i=52;a=[""]*i
      | ^
a.cc:1:11: error: 'i' does not name a type
    1 | j=input();i=52;a=[""]*i
      |           ^
a.cc:1:16: error: 'a' does not name a type
    1 | j=input();i=52;a=[""]*i
      |                ^
a.cc:2:14: error: 'a' does not name a type
    2 | while i:i-=1;a[i]="SHCD"[i/13]+" "+str(i%13+1)
      |              ^
a.cc:3:14: error: 'a' does not name a type
    3 | while j:j-=1;a.remove(raw_input())
      |              ^
Language: C++

#include <iostream>
using namespace std;


int t;
cin>>t;
int k[4][13]=0;
int main(){
  int a;
  int b;
  for(int i;i<t;i++){
    cin>>b>>a;
  if(b=="S"){k[0][a-1]=1;}
  if(b=="H"){k[1][a-1]=1;}
  if(b=="C"){k[2][a-1]=1;}
  if(b=="D"){k[3][a-1]=1;}
  }
    for(int ushi;ushi<13;ushi++){
      if(k[0][ushi]==0){
	cout<<"S "<<ushi;}
    }
     for(int ushi;ushi<13;ushi++){
      if(k[1][ushi]==0){
	cout<<"H "<<ushi;}
     }
      for(int ushi;ushi<13;ushi++){
      if(k[2][ushi]==0){
	cout<<"C "<<ushi;}
      }
       for(int ushi;ushi<13;ushi++){
	 if(k[3][ushi]==0){
	cout<<"D "<<ushi;}
       }
}

Compiler output:
a.cc:6:1: error: 'cin' does not name a type
    6 | cin>>t;
      | ^~~
a.cc:7:14: error: array must be initialized with a brace-enclosed initializer
    7 | int k[4][13]=0;
      |              ^
a.cc: In function 'int main()':
a.cc:13:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if(b=="S"){k[0][a-1]=1;}
      |      ~^~~~~
a.cc:14:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |   if(b=="H"){k[1][a-1]=1;}
      |      ~^~~~~
a.cc:15:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   if(b=="C"){k[2][a-1]=1;}
      |      ~^~~~~
a.cc:16:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |   if(b=="D"){k[3][a-1]=1;}
      |      ~^~~~~
Language: C++

#include <iostream>
using namespace std;


int t;
int k[4][13];
int main(){
  cin>>t;
  int a;
  int b;
  for(int i;i<t;i++){
    cin>>b>>a;
  if(b=="S"){k[0][a-1]=1;}
  if(b=="H"){k[1][a-1]=1;}
  if(b=="C"){k[2][a-1]=1;}
  if(b=="D"){k[3][a-1]=1;}
  }
    for(int ushi;ushi<13;ushi++){
      if(k[0][ushi]==0){
	cout<<"S "<<ushi;}
    }
     for(int ushi;ushi<13;ushi++){
      if(k[1][ushi]==0){
	cout<<"H "<<ushi;}
     }
      for(int ushi;ushi<13;ushi++){
      if(k[2][ushi]==0){
	cout<<"C "<<ushi;}
      }
       for(int ushi;ushi<13;ushi++){
	 if(k[3][ushi]==0){
	cout<<"D "<<ushi;}
       }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if(b=="S"){k[0][a-1]=1;}
      |      ~^~~~~
a.cc:14:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |   if(b=="H"){k[1][a-1]=1;}
      |      ~^~~~~
a.cc:15:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   if(b=="C"){k[2][a-1]=1;}
      |      ~^~~~~
a.cc:16:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |   if(b=="D"){k[3][a-1]=1;}
      |      ~^~~~~
Language: C++


int t;
int k[4][13];
int main(){
  cin>>t;
  int a;
  char b;
  for(int i;i<t;i++){
    cin>>b>>a;
  if(b=="S"){k[0][a-1]=1;}
  if(b=="H"){k[1][a-1]=1;}
  if(b=="C"){k[2][a-1]=1;}
  if(b=="D"){k[3][a-1]=1;}
  }
    for(int ushi;ushi<13;ushi++){
      if(k[0][ushi]==0){
	cout<<"S "<<ushi;}
    }
     for(int ushi;ushi<13;ushi++){
      if(k[1][ushi]==0){
	cout<<"H "<<ushi;}
     }
      for(int ushi;ushi<13;ushi++){
      if(k[2][ushi]==0){
	cout<<"C "<<ushi;}
      }
       for(int ushi;ushi<13;ushi++){
	 if(k[3][ushi]==0){
	cout<<"D "<<ushi;}
       }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>t;
      |   ^~~
a.cc:10:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(b=="S"){k[0][a-1]=1;}
      |      ~^~~~~
a.cc:11:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(b=="H"){k[1][a-1]=1;}
      |      ~^~~~~
a.cc:12:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if(b=="C"){k[2][a-1]=1;}
      |      ~^~~~~
a.cc:13:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if(b=="D"){k[3][a-1]=1;}
      |      ~^~~~~
a.cc:17:9: error: 'cout' was not declared in this scope
   17 |         cout<<"S "<<ushi;}
      |         ^~~~
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout<<"H "<<ushi;}
      |         ^~~~
a.cc:25:9: error: 'cout' was not declared in this scope
   25 |         cout<<"C "<<ushi;}
      |         ^~~~
a.cc:29:9: error: 'cout' was not declared in this scope
   29 |         cout<<"D "<<ushi;}
      |         ^~~~
Language: C++

#include <stdio.h>

typedef enum{S, H, D, C} SUIT;

int main(void){
    int cards[4][13], n, r;
    char s;
    char suits = "SHDC";

    scanf("%d", &n);
    for (int i=0; i<4; i++){
        for (int j=0; j<13; j++){
             cards[i][j]=0;
        }
    }
    for (int i=0; i<n; i++){
        scanf("%c %d", &c, &r);
        switch (c){
        case 'S':
            cards[S][r]=1;
            break;
        case 'D':
            cards[S][r]=1;
            break;
        case 'H':
            cards[S][r]=1;
            break;
        case 'C':
            cards[S][r]=1;
            break;
    }
    for (int i=0; i<4; i++){
        for (int j=0; j<13; j++){
             if (cards[i][j]==0){
                 printf("%c %d\n", suits[i], j);
        }
    }

    printf("\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    8 |     char suits = "SHDC";
      |                  ^~~~~~
      |                  |
      |                  const char*
a.cc:17:25: error: 'c' was not declared in this scope
   17 |         scanf("%c %d", &c, &r);
      |                         ^
a.cc:35:41: error: invalid types 'char[int]' for array subscript
   35 |                  printf("%c %d\n", suits[i], j);
      |                                         ^
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:16:28: note: to match this '{'
   16 |     for (int i=0; i<n; i++){
      |                            ^
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:5:15: note: to match this '{'
    5 | int main(void){
      |               ^
Language: C++

#include <stdio.h>

typedef enum{S, H, D, C} SUIT;

int main(void){
    int cards[4][13], n, r;
    char s;
    char suits[] = "SHDC";

    scanf("%d", &n);
    for (int i=0; i<4; i++){
        for (int j=0; j<13; j++){
             cards[i][j]=0;
        }
    }
    for (int i=0; i<n; i++){
        scanf("%c %d", &c, &r);
        switch (c){
        case 'S':
            cards[S][r]=1;
            break;
        case 'D':
            cards[S][r]=1;
            break;
        case 'H':
            cards[S][r]=1;
            break;
        case 'C':
            cards[S][r]=1;
            break;
    }
    for (int i=0; i<4; i++){
        for (int j=0; j<13; j++){
             if (cards[i][j]==0){
                 printf("%c %d\n", suits[i], j);
        }
    }

    printf("\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 'c' was not declared in this scope
   17 |         scanf("%c %d", &c, &r);
      |                         ^
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:16:28: note: to match this '{'
   16 |     for (int i=0; i<n; i++){
      |                            ^
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:5:15: note: to match this '{'
    5 | int main(void){
      |               ^
Language: C++

#include <stdio.h>

typedef enum{S, H, D, C} SUIT;

int main(void){
    int cards[4][13], n, r;
    char s;
    char suits[] = "SHDC";

    scanf("%d", &n);
    for (int i=0; i<4; i++){
        for (int j=0; j<13; j++){
             cards[i][j]=0;
        }
    }
    for (int i=0; i<n; i++){
        scanf("%c %d", &s, &r);
        switch (s){
        case 'S':
            cards[S][r]=1;
            break;
        case 'D':
            cards[S][r]=1;
            break;
        case 'H':
            cards[S][r]=1;
            break;
        case 'C':
            cards[S][r]=1;
            break;
    }
    for (int i=0; i<4; i++){
        for (int j=0; j<13; j++){
             if (cards[i][j]==0){
                 printf("%c %d\n", suits[i], j);
        }
    }

    printf("\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:16:28: note: to match this '{'
   16 |     for (int i=0; i<n; i++){
      |                            ^
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:5:15: note: to match this '{'
    5 | int main(void){
      |               ^
Language: C++

#include <stdio.h>

typedef enum{S, H, D, C} SUIT;

int main(void){
    int cards[4][13], n, r;
    char s;
    char suits[] = "SHDC";

    scanf("%d", &n);
    for (int i=0; i<4; i++){
        for (int j=0; j<13; j++){
             cards[i][j]=0;
        }
    }
    for (int i=0; i<n; i++){
        scanf("%c %d", &s, &r);
        switch (s){
        case 'S':
            cards[S][r]=1;
            break;
        case 'D':
            cards[S][r]=1;
            break;
        case 'H':
            cards[S][r]=1;
            break;
        case 'C':
            cards[S][r]=1;
            break;
    }
    for (int i=0; i<4; i++){
        for (int j=0; j<13; j++){
             if (cards[i][j]==0){
                 printf("%c %d\n", suits[i], j);
             }
        }
    }

    printf("\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:5:15: note: to match this '{'
    5 | int main(void){
      |               ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int m, n, i, j, r, card[4][14];
  char M;
  for(i = 0; i < 4; i++){
    for(j = 1; j < 14; j++){
      card[i][j] = 0;
    }
  }
  cin >> n;
  for(m = 0; m < n; m++){
    cin >> M >> r;
    if(M == "S") card[0][r] = 1;
    if(M == "H") card[1][r] = 1;
    if(M == "C") card[2][r] = 1;
    if(M == "D") card[3][r] = 1;
  }
  for(i = 0; i < 4; i++){
    for(j = 1; j < 14; j++){
      if(card[i][j] == 0){
        if(i == 0) M == "S";
        if(i == 1) M == "H";
        if(i == 2) M == "C";
        if(i == 3) M == "D";
        cout << M << " " << j << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     if(M == "S") card[0][r] = 1;
      |        ~~^~~~~~
a.cc:16:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(M == "H") card[1][r] = 1;
      |        ~~^~~~~~
a.cc:17:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     if(M == "C") card[2][r] = 1;
      |        ~~^~~~~~
a.cc:18:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     if(M == "D") card[3][r] = 1;
      |        ~~^~~~~~
a.cc:23:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |         if(i == 0) M == "S";
      |                    ~~^~~~~~
a.cc:24:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |         if(i == 1) M == "H";
      |                    ~~^~~~~~
a.cc:25:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |         if(i == 2) M == "C";
      |                    ~~^~~~~~
a.cc:26:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |         if(i == 3) M == "D";
      |                    ~~^~~~~~
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int m, n, i, j, r, card[4][14];
  char M;
  for(i = 0; i < 4; i++){
    for(j = 1; j < 14; j++){
      card[i][j] = 0;
    }
  }
  cin >> n;
  for(m = 0; m < n; m++){
    cin >> M >> r;
    if(M == 'S') card[0][r] = 1;
    if(M == 'H') card[1][r] = 1;
    if(M == 'C') card[2][r] = 1;
    if(M == 'D') card[3][r] = 1;
  }
  for(i = 0; i < 4; i++){
    for(j = 1; j < 14; j++){
      if(card[i][j] == 0){
        if(i == 0) M == 'S';
        if(i == 1) M == 'H';
        if(i == 2) M == 'C';
        if(i == 3) M == 'D';
        cout << M << " " << j << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int m, n, i, j, r, card[4][14];
  char M;
  for(i = 0; i < 4; i++){
    for(j = 1; j < 14; j++){
      card[i][j] = 0;
    }
  }
  cin >> n;
  for(m = 0; m < n; m++){
    cin >> M >> r;
    if(M == 'S') card[0][r] = 1;
    if(M == 'H') card[1][r] = 1;
    if(M == 'C') card[2][r] = 1;
    if(M == 'D') card[3][r] = 1;
  }
  for(i = 0; i < 4; i++){
    for(j = 1; j < 14; j++){
      if(card[i][j] == 0){
        if(i == 0) M == 'S';
        if(i == 1) M == 'H';
        if(i == 2) M == 'C';
        if(i == 3) M == 'D';
        cout << M << " " << j << endl;
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

cards = {}
%w(S H C D).each do |mark|
     for num in 1..13
        k = "#{mark} #{num}"
        cards[k] = false
    end
end

n = gets.chomp.to_i
n.times do |i|
    card = gets.chomp
    cards[card] = true
end

cards.select!{|k,v|
    puts k unless v
}

Compiler output:
a.cc:3:17: error: too many decimal points in number
    3 |      for num in 1..13
      |                 ^~~~~
a.cc:1:1: error: 'cards' does not name a type
    1 | cards = {}
      | ^~~~~
a.cc:2:1: error: expected unqualified-id before '%' token
    2 | %w(S H C D).each do |mark|
      | ^
Language: C++

#include<string>
#include<iostream>
#include<cctype>
#include<cmath>
#include<cstdio>

using namespace std;
int main(){

int a;
cin >> a;

char b[52];
int c[52];

int d[4][13];

for(int i=0;i<4;i++){
	for(int j=0;j<14;j++){
	d[i][j]=0;
	}
}

for(int i=0;i<a;i++){
	cin >> b[i] >> c[i];
	int n=c[i];
	if(b[i]=='S') d[0][c[i]]=1; 
	else if(b[i]=='H') d[1][n]=1;
	else if(b[i]=='C') d[2][n]=1;
	else d[3][n]=1;
}

for(int i=0;i<4;i++){
	for(int j=1;j<14;j++){
		if(d[i][j]==0){
			if(i==0) cout << 'S'<<'' <<j << endl;
			else if(i==1) cout << 'H' << '' << j << endl;
			else if(i==2) cout << 'C' << ''<< j << endl;		
			else cout << 'D'<< '' << j << endl;
			}
	}

Compiler output:
a.cc:36:47: error: empty character constant
   36 |                         if(i==0) cout << 'S'<<'' <<j << endl;
      |                                               ^~
a.cc:37:54: error: empty character constant
   37 |                         else if(i==1) cout << 'H' << '' << j << endl;
      |                                                      ^~
a.cc:38:54: error: empty character constant
   38 |                         else if(i==2) cout << 'C' << ''<< j << endl;
      |                                                      ^~
a.cc:39:44: error: empty character constant
   39 |                         else cout << 'D'<< '' << j << endl;
      |                                            ^~
a.cc: In function 'int main()':
a.cc:41:10: error: expected '}' at end of input
   41 |         }
      |          ^
a.cc:33:21: note: to match this '{'
   33 | for(int i=0;i<4;i++){
      |                     ^
a.cc:41:10: error: expected '}' at end of input
   41 |         }
      |          ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

#include<string>
#include<iostream>
#include<cctype>
#include<cmath>
#include<cstdio>

using namespace std;
int main(){

int a;
cin >> a;

char b[52];
int c[52];

int d[4][13];

for(int i=0;i<4;i++){
	for(int j=0;j<14;j++){
	d[i][j]=0;
	}
}

for(int i=0;i<a;i++){
	cin >> b[i] >> c[i];
	int n=c[i];
	if(b[i]=='S') d[0][c[i]]=1; 
	else if(b[i]=='H') d[1][n]=1;
	else if(b[i]=='C') d[2][n]=1;
	else d[3][n]=1;
}

for(int i=0;i<4;i++){
	for(int j=1;j<14;j++){
		if(d[i][j]==0{
			if(i==0) cout << "S " <<j << endl;
			else if(i==1) cout << "H " << j <<endl;
			else if(i==2) cout << "C " << j <<endl;		
			else cout << "D " << j <<endl;
			}
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:30: error: expected ')' before '{' token
   35 |                 if(d[i][j]==0{
      |                   ~          ^
      |                              )
a.cc:41:9: error: expected primary-expression before '}' token
   41 |         }
      |         ^
a.cc:41:10: error: expected '}' at end of input
   41 |         }
      |          ^
a.cc:33:21: note: to match this '{'
   33 | for(int i=0;i<4;i++){
      |                     ^
a.cc:41:10: error: expected '}' at end of input
   41 |         }
      |          ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

#include<string>
#include<iostream>
#include<cctype>
#include<cmath>
#include<cstdio>

using namespace std;
int main(){

int a;
cin >> a;

char b[52];
int c[52];

int d[4][13];

for(int i=0;i<4;i++){
	for(int j=0;j<14;j++){
	d[i][j]=0;
	}
}

for(int i=0;i<a;i++){
	cin >> b[i] >> c[i];
	int n=c[i];
	if(b[i]=='S') d[0][c[i]]=1; 
	else if(b[i]=='H') d[1][n]=1;
	else if(b[i]=='C') d[2][n]=1;
	else d[3][n]=1;
}

for(int i=0;i<4;i++){
	for(int j=1;j<14;j++){
		if(d[i][j]==0){
			if(i==0) cout << "S " < <j << endl;
			else if(i==1) cout << "H " << j <<endl;
			else if(i==2) cout << "C " << j <<endl;		
			else cout << "D " << j <<endl;
			}
	}
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:49: error: expected primary-expression before '<' token
   36 |                         if(i==0) cout << "S " < <j << endl;
      |                                                 ^
a.cc:36:52: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   36 |                         if(i==0) cout << "S " < <j << endl;
      |                                                  ~~^~~~~~~
Language: C++

#include<string>
#include<iostream>
#include<cctype>
#include<cmath>
#include<cstdio>

using namespace std;
int main(){

int a;
cin >> a;

char b[52];
int c[52];

int d[4][14];

for(int i=0;i<4;i++){
	for(int j=0;j<14;j++){
	d[i][j]=0;
	}
}

for(int i=0;i<a;i++){
	cin >> b[i] >> c[i];
	int n=c[i];
	if(b[i]=='S') d[0][c[i]]=1; 
	else if(b[i]=='H') d[1][n]=1;
	else if(b[i]=='C') d[2][n]=1;
	else d[3][n]=1;
}

for(int i=0;i<4;i++){
	for(int j=1;j<14;j++){
		if(d[i][j]==0){
			if(i == 0) ch = 'S';
                if(i == 1) ch = 'H';
                if(i == 2) ch = 'C';
                if(i == 3) ch = 'D';
                printf("%c %d\n", ch, j);
			}
	}
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:36: error: 'ch' was not declared in this scope; did you mean 'c'?
   36 |                         if(i == 0) ch = 'S';
      |                                    ^~
      |                                    c
a.cc:37:28: error: 'ch' was not declared in this scope; did you mean 'c'?
   37 |                 if(i == 1) ch = 'H';
      |                            ^~
      |                            c
a.cc:38:28: error: 'ch' was not declared in this scope; did you mean 'c'?
   38 |                 if(i == 2) ch = 'C';
      |                            ^~
      |                            c
a.cc:39:28: error: 'ch' was not declared in this scope; did you mean 'c'?
   39 |                 if(i == 3) ch = 'D';
      |                            ^~
      |                            c
a.cc:40:35: error: 'ch' was not declared in this scope; did you mean 'c'?
   40 |                 printf("%c %d\n", ch, j);
      |                                   ^~
      |                                   c
Language: C++

#include<string>
#include<iostream>
#include<cctype>
#include<cmath>
#include<cstdio>

using namespace std;
int main(){

int a;
cin >> a;

char b[52];
int c[52];

int d[4][14];

for(int i=0;i<4;i++){
	for(int j=0;j<14;j++){
	d[i][j]=0;
	}
}

for(int i=0;i<a;i++){
	cin >> b[i] >> c[i];
	int n=c[i];
	if(b[i]=='S') d[0][c[i]]=1; 
	else if(b[i]=='H') d[1][n]=1;
	else if(b[i]=='C') d[2][n]=1;
	else d[3][n]=1;
}

for(int i=0;i<4;i++){
	for(int j=1;j<14;j++){
		if(d[i][j]==0){
			char ch;
			if(i == 0) ch = 'S';
                if(i == 1) ch = 'H';
                if(i == 2) ch = 'C';
                if(i == 3) ch = 'D';
                printf("%c %d\n", ch, j);
			}
	}
}

ret

Compiler output:
a.cc: In function 'int main()':
a.cc:46:1: error: 'ret' was not declared in this scope
   46 | ret
      | ^~~
a.cc:46:4: error: expected '}' at end of input
   46 | ret
      |    ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

#include <iostream>
#define TYPE 4
#define CLASS 13

int main(){
	int num;
	int array[TYPE][CLASS]={};
	char type[4]={'S','H','C','D'};
	std::cin>>num;
	for(int i=0;i<num;i++){
		char c;
		int  n;
		std::cin>>c;
		std::cin>>n;
		for(int j=0;j<TYPE;j++){
			if(c==type[i]){
				array[i][n-1]=1;
			}
		}
	}
	for(int i=0;i<TYPE;i++){
		for(int j=0;j<CLASS;j++){
			if(array[i][j]){
				std::cout<<type[i]<<" "<<j+1<<endl;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:63: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   24 |                                 std::cout<<type[i]<<" "<<j+1<<endl;
      |                                                               ^~~~
      |                                                               std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
   int n, a, b, i, s[14], h[14], c[14], d[14];
   char surt;
   for ( i = 0; i < 14; i++)s[i] = 0;
   for ( i = 0; i < 14; i++)h[i] = 0;
   for ( i = 0; i < 14; i++)c[i] = 0;
   for ( i = 0; i < 14; i++)d[i] = 0;
   cin >> n;
   for ( i = 0; i < n; i++ )
   {
      cin >> surt >> a;
      if ( surt == S )s[a] = 1;
      if ( surt == H )h[a] = 1;
      if ( surt == C )c[a] = 1;
      if ( surt == D )d[a] = 1;  
   }
   for ( i = 0; i < 13; i++)
   {
      if ( s[i] == 0 )cout << "S " << (i + 1) << endl; 
   }
for ( i = 0; i < 13; i++)
   {
      if ( h[i] == 0 )cout << "H " << (i + 1) << endl; 
   }
for ( i = 0; i < 13; i++)
   {
      if ( c[i] == 0 )cout << "C " << (i + 1) << endl; 
   }
for ( i = 0; i < 13; i++)
   {
      if ( d[i] == 0 )cout << "D " << (i + 1) << endl; 
   }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: 'S' was not declared in this scope
   15 |       if ( surt == S )s[a] = 1;
      |                    ^
a.cc:16:20: error: 'H' was not declared in this scope
   16 |       if ( surt == H )h[a] = 1;
      |                    ^
a.cc:17:20: error: 'C' was not declared in this scope
   17 |       if ( surt == C )c[a] = 1;
      |                    ^
a.cc:18:20: error: 'D' was not declared in this scope
   18 |       if ( surt == D )d[a] = 1;
      |                    ^
Language: C++

#include <stdio.h>
int main(void)
{
int n, no, a, i, j;
char m;
int x[4][13];

scanf("%d",&n);

while(n > 0){
scanf("%c %d",&m,&no)

if(m == 'S')
   a = 0;
if(m == 'H')
   a = 1;
if(m == 'C')
   a = 2;
if(m == 'D')
   a = 3;

x[a][no] = 1;
i--;
}

for(i = 0; i < 4; i++){
   for(j = 0; j < 13; j++{
if(x[i][j] == 1){

if(i == 0)
m = 'S';
if(i == 1)
m = 'H';
if(i == 2)
m = 'C';
if(i == 3)
m = 'D';

printf("%c %d\n",m,j + 1);
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: expected ';' before 'if'
   11 | scanf("%c %d",&m,&no)
      |                      ^
      |                      ;
   12 | 
   13 | if(m == 'S')
      | ~~                    
a.cc:27:26: error: expected ')' before '{' token
   27 |    for(j = 0; j < 13; j++{
      |       ~                  ^
      |                          )
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:26:23: note: to match this '{'
   26 | for(i = 0; i < 4; i++){
      |                       ^
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

#include <stdio.h>
int main(void)
{
int n, no, a, i, j;
char m;
int x[4][13];

scanf("%d",&n);

while(n > 0){
scanf("%c %d",&m,&no);

if(m == 'S')
   a = 0;
if(m == 'H')
   a = 1;
if(m == 'C')
   a = 2;
if(m == 'D')
   a = 3;

x[a][no] = 1;
i--;
}

for(i = 0; i < 4; i++){
   for(j = 0; j < 13; j++{
if(x[i][j] == 1){

if(i == 0)
m = 'S';
if(i == 1)
m = 'H';
if(i == 2)
m = 'C';
if(i == 3)
m = 'D';

printf("%c %d\n",m,j + 1);
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:26: error: expected ')' before '{' token
   27 |    for(j = 0; j < 13; j++{
      |       ~                  ^
      |                          )
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:26:23: note: to match this '{'
   26 | for(i = 0; i < 4; i++){
      |                       ^
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

#include <stdio.h>
int main(void)
{
int n, no, a, i, j;
char m;
int x[4][13];

scanf("%d",&n);

while(n > 0){
scanf("%c %d",&m,&no);

if(m == 'S')
   a = 0;
if(m == 'H')
   a = 1;
if(m == 'C')
   a = 2;
if(m == 'D')
   a = 3;

x[a][no] = 1;
i--;
}

for(i = 0; i < 4; i++){
   for(j = 0; j < 13; j++{
if(x[i][j] == 1){

if(i == 0)
m = 'S';
if(i == 1)
m = 'H';
if(i == 2)
m = 'C';
if(i == 3)
m = 'D';

printf("%c %d\n",m,j + 1);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:26: error: expected ')' before '{' token
   27 |    for(j = 0; j < 13; j++{
      |       ~                  ^
      |                          )
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:26:23: note: to match this '{'
   26 | for(i = 0; i < 4; i++){
      |                       ^
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

#include <stdio.h>
int main(void)
{
int n, no, a, i, j;
char m;
int x[4][13];

scanf("%d",&n);

while(n > 0){
scanf("%c %d",&m,&no);

if(m == 'S')
   a = 0;
if(m == 'H')
   a = 1;
if(m == 'C')
   a = 2;
if(m == 'D')
   a = 3;

x[a][no] = 1;
i--;
}

for(i = 0; i < 4; i++){
   for(j = 0; j < 13; j++{
if(x[i][j] == 1){

if(i == 0)
m = 'S';
if(i == 1)
m = 'H';
if(i == 2)
m = 'C';
if(i == 3)
m = 'D';

printf("%c %d\n",m,j + 1);
}
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:26: error: expected ')' before '{' token
   27 |    for(j = 0; j < 13; j++{
      |       ~                  ^
      |                          )
a.cc:43:2: error: expected '}' at end of input
   43 | }
      |  ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

#include <iostream>
#include <cstdio>
#include <map>
#include <array>

using namespace std;

int main()
{
    map<char, array<bool,13> > in_posession = {{'S', {}}, {'H', {}}, {'C', {}}, {'D', {}}};
    int n;

    scanf("%d\n", &n);
    for (int i = 0; i < n; i++) {
        char suit;
        int rank;

        scanf("%c %d\n", &suit, &rank);
        in_posession[suit][rank-1] = true;
    }

    for (char suit : { 'S', 'H', 'C', 'D' })
        for (int i = 0; i < 13; i++)
            if (!in_posession[suit][i])javascript:void(0)
                cout << suit << ' ' << i+1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:58: error: expected ';' before 'cout'
   24 |             if (!in_posession[suit][i])javascript:void(0)
      |                                                          ^
      |                                                          ;
   25 |                 cout << suit << ' ' << i+1 << endl;
      |                 ~~~~
Language: C++

S=[nil]*13
H=[nil]*13
C=[nil]*13
D=[nil]*13

gets.to_i.times do
   c,n = gets.split
    n=n.to_i
     eval("%s[%d]=true"%[c,n-1])
end

S.each_with_index{|x,i| puts "S " + (i+1).to_s if not x}
H.each_with_index{|x,i| puts "H " + (i+1).to_s if not x}
C.each_with_index{|x,i| puts "C " + (i+1).to_s if not x}
D.each_with_index{|x,i| puts "D " + (i+1).to_s if not x}

Compiler output:
a.cc:1:1: error: 'S' does not name a type
    1 | S=[nil]*13
      | ^
a.cc:13:1: error: 'H' does not name a type
   13 | H.each_with_index{|x,i| puts "H " + (i+1).to_s if not x}
      | ^
a.cc:14:1: error: 'C' does not name a type
   14 | C.each_with_index{|x,i| puts "C " + (i+1).to_s if not x}
      | ^
a.cc:15:1: error: 'D' does not name a type
   15 | D.each_with_index{|x,i| puts "D " + (i+1).to_s if not x}
      | ^