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

#include<iostream>
using namespace std;

int main(){
	bool cards[4][14];
	int n, rank;
	char suit;

	for(int s=0; s<4; s++){
		for (int r=1; r<=13; r++){
			cards[s][r] = 0;
                }
        }

	cin >> n;
	for(int i=0; i<n; i++){
		cin >> suit >> rank;
		if(suit == 'S'){
                    cards[0][rank] = 1;
		}
                if(suit == 'H')
                    cards[1][rank] = 1;
		}
                if(suit == 'C')
                    cards[2][rank] = 1;
                }
		if(suit == 'D') 
                    cards[3][rank] = 1;
                }
	}

	for(int s=0; s<4; s++){
		for(int r=1; r<=13; r++){
			if(cards[s][r]) continue;
			if(s==0) suit = 'S';
			if(s==1) suit = 'H';
			if(s==2) suit = 'C';
			if(s==3) suit = 'D';
			cout << suit << "" << r << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc:27:17: error: expected unqualified-id before 'if'
   27 |                 if(suit == 'D')
      |                 ^~
a.cc:29:17: error: expected declaration before '}' token
   29 |                 }
      |                 ^
a.cc:30:9: error: expected declaration before '}' token
   30 |         }
      |         ^
a.cc:32:9: error: expected unqualified-id before 'for'
   32 |         for(int s=0; s<4; s++){
      |         ^~~
a.cc:32:22: error: 's' does not name a type
   32 |         for(int s=0; s<4; s++){
      |                      ^
a.cc:32:27: error: 's' does not name a type
   32 |         for(int s=0; s<4; s++){
      |                           ^
a.cc:42:9: error: expected unqualified-id before 'return'
   42 |         return 0;
      |         ^~~~~~
a.cc:43:1: error: expected declaration before '}' token
   43 | }
      | ^
Language: C++

cards = {
	'S': [0 for _ in range(13)],
        'H': [0 for _ in range(13)],
        'C': [0 for _ in range(13)],
        'D': [0 for _ in range(13)],
}
n = int(input())
for _ in range(n):
	(s, r) = input.().split()
	cards[s][int(r) - 1] = 1

for s in ('S', 'H', 'C', 'D',):
	for r in range(13):
		if cards [s] [r] == 0:
			print(s, r + 1)

Compiler output:
a.cc:1:1: error: 'cards' does not name a type
    1 | cards = {
      | ^~~~~
a.cc:7:1: error: 'n' does not name a type
    7 | n = int(input())
      | ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
  int n;
  int cards[5][14] = { { 0 } };
  char pattern;
  int num;

  cin >> n;
  for ( int i = 0; i < n; i++ ) {
    cin >> pattern >> num;
    switch ( pattern ) {
      case 'S';
        cards[0][num-1]=true;
        break; 
      case 'H';
        cards[1][num-1]=true;
        break; 
      case 'C';
        cards[2][num-1]=true;
        break; 
      case 'D';
        cards[3][num-1]=true;
        break;
      }
  }
  for ( int i = 0; i < 4; i++ ) {
    for ( int j = 0; j < 13; j++ ) {
      if ( false == cards[i][j] ) {
        switch ( i ) {
          case 0;
            cout << "S "<<(j+1)<<endl;
            break;
          case 1;
            cout << "H "<<(j+1)<<endl;
            break;
          case 2;
            cout << "C "<<(j+1)<<endl;
            break;
          case 3;
            cout << "D "<<(j+1)<<endl;
            break;
          }
        }
      }
    }
  } 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: expected ':' before ';' token
   16 |       case 'S';
      |               ^
      |               :
a.cc:19:15: error: expected ':' before ';' token
   19 |       case 'H';
      |               ^
      |               :
a.cc:22:15: error: expected ':' before ';' token
   22 |       case 'C';
      |               ^
      |               :
a.cc:25:15: error: expected ':' before ';' token
   25 |       case 'D';
      |               ^
      |               :
a.cc:34:17: error: expected ':' before ';' token
   34 |           case 0;
      |                 ^
      |                 :
a.cc:37:17: error: expected ':' before ';' token
   37 |           case 1;
      |                 ^
      |                 :
a.cc:40:17: error: expected ':' before ';' token
   40 |           case 2;
      |                 ^
      |                 :
a.cc:43:17: error: expected ':' before ';' token
   43 |           case 3;
      |                 ^
      |                 :
a.cc: At global scope:
a.cc:51:3: error: expected unqualified-id before 'return'
   51 |   return 0;
      |   ^~~~~~
a.cc:52:1: error: expected declaration before '}' token
   52 | }
      | ^
Language: C++

#include <iostream>
 
using namespace std;
 
int main()
{
  int n;
  int cards[5][14] = { { 0 } };
  char pattern;
  int num;
 
  cin >> n;
  for ( int i = 0; i < n; i++ ) {
    cin >> pattern >> num;
    switch ( pattern ) {
      case 'S':
        cards[0][num-1]=true;
        break; 
      case 'H':
        cards[1][num-1]=true;
        break; 
      case 'C':
        cards[2][num-1]=true;
        break; 
      case 'D':
        cards[3][num-1]=true;
        break;
      }
  }
  for ( int i = 0; i < 4; i++ ) {
    for ( int j = 0; j < 13; j++ ) {
      if ( false == cards[i][j] ) {
        switch ( i ) {
          case 0:
            cout << "S "<<(j+1)<<endl;
            break;
          case 1:
            cout << "H "<<(j+1)<<endl;
            break;
          case 2:
            cout << "C "<<(j+1)<<endl;
            break;
          case 3:
            cout << "D "<<(j+1)<<endl;
            break;
          }
        }
      }
    }
  } 
  return 0;
}

Compiler output:
a.cc:51:3: error: expected unqualified-id before 'return'
   51 |   return 0;
      |   ^~~~~~
a.cc:52:1: error: expected declaration before '}' token
   52 | }
      | ^
Language: C++



#include<iostream>
using namespace std;
int kazu,c[5][14]={{0}};
string k,g;
]int in(){
int n;
cin>>n;
for(int a=0;a<n;a++){
cin>>k>>kazu;
if(k=="S")
c[1][kazu]=1;
if(k=="H")
c[2][kazu]=1;
if(k=="C")
c[3][kazu]=1;
if(k=="D")
c[4][kazu]=1;
}
}
int out(){for(int a=1;a<5;a++){for(int b=1;b<14;b++){if(c[a][b]!=1)if(a==1)g="S";if(a==2)g="H";if(a==3)g="C";if(a==4)g="D"; cout<<g<<" "<<b<<endl;}}}int main(){in();out();return 0;} 

Compiler output:
a.cc:7:1: error: expected unqualified-id before ']' token
    7 | ]int in(){
      | ^
a.cc: In function 'int out()':
a.cc:22:149: warning: no return statement in function returning non-void [-Wreturn-type]
   22 | int out(){for(int a=1;a<5;a++){for(int b=1;b<14;b++){if(c[a][b]!=1)if(a==1)g="S";if(a==2)g="H";if(a==3)g="C";if(a==4)g="D"; cout<<g<<" "<<b<<endl;}}}int main(){in();out();return 0;}
      |                                                                                                                                                     ^
a.cc: In function 'int main()':
a.cc:22:161: error: 'in' was not declared in this scope; did you mean 'int'?
   22 | int out(){for(int a=1;a<5;a++){for(int b=1;b<14;b++){if(c[a][b]!=1)if(a==1)g="S";if(a==2)g="H";if(a==3)g="C";if(a==4)g="D"; cout<<g<<" "<<b<<endl;}}}int main(){in();out();return 0;}
      |                                                                                                                                                                 ^~
      |                                                                                                                                                                 int
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main(){
int n,a[53];
int hantei[53];
char b[53];
int c;

for(int i=1;i<53;i++){
hantei[i]=0;
}

cin>>n;

for(int i=1;i<=n;i++){
cin>>b[i]>>a[i];

if(b[i]='S'){
hantei[0+a[i]]=1;
}

if(b[i]='H'){
hantei[13+a[i]]=1;
}

if(b[i]='C'){
hantei[26+a[i]]=1;
}

if(b[i]='D'){
hantei[39+a[i]]=1;
}

}

for(int i=1;i<53){
if(hantei[i]==0){

else if(i<=13){
cout<<"S "<<((i-1)%13+1<<endl;
}

else if(i<=13){
cout<<"H "<<((i-1)%13+1<<endl;
}

else if(i<=13){
cout<<"C "<<((i-1)%13+1<<endl;
}

else if(i<=13){
cout<<"D "<<((i-1)%13+1<<endl;
}

}
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:17: error: expected ';' before ')' token
   38 | for(int i=1;i<53){
      |                 ^
      |                 ;
a.cc:41:1: error: expected '}' before 'else'
   41 | else if(i<=13){
      | ^~~~
a.cc:39:17: note: to match this '{'
   39 | if(hantei[i]==0){
      |                 ^
a.cc:42:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   42 | cout<<"S "<<((i-1)%13+1<<endl;
      |              ~~~~~~~~~~^~~~~~
a.cc:42:30: error: expected ')' before ';' token
   42 | cout<<"S "<<((i-1)%13+1<<endl;
      |             ~                ^
      |                              )
a.cc:46:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   46 | cout<<"H "<<((i-1)%13+1<<endl;
      |              ~~~~~~~~~~^~~~~~
a.cc:46:30: error: expected ')' before ';' token
   46 | cout<<"H "<<((i-1)%13+1<<endl;
      |             ~                ^
      |                              )
a.cc:50:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   50 | cout<<"C "<<((i-1)%13+1<<endl;
      |              ~~~~~~~~~~^~~~~~
a.cc:50:30: error: expected ')' before ';' token
   50 | cout<<"C "<<((i-1)%13+1<<endl;
      |             ~                ^
      |                              )
a.cc:54:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   54 | cout<<"D "<<((i-1)%13+1<<endl;
      |              ~~~~~~~~~~^~~~~~
a.cc:54:30: error: expected ')' before ';' token
   54 | cout<<"D "<<((i-1)%13+1<<endl;
      |             ~                ^
      |                              )
a.cc: At global scope:
a.cc:60:1: error: expected unqualified-id before 'return'
   60 | return 0;
      | ^~~~~~
a.cc:61:1: error: expected declaration before '}' token
   61 | }
      | ^
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main(){
int n,a[53];
int hantei[53];
char b[53];
int c;

for(int i=1;i<53;i++){
hantei[i]=0;
}

cin>>n;

for(int i=1;i<=n;i++){
cin>>b[i]>>a[i];

if(b[i]='S'){
hantei[0+a[i]]=1;
}

if(b[i]='H'){
hantei[13+a[i]]=1;
}

if(b[i]='C'){
hantei[26+a[i]]=1;
}

if(b[i]='D'){
hantei[39+a[i]]=1;
}

}

for(int i=1;i<53;i++){
if(hantei[i]==0){

else if(i<=13){
cout<<"S "<<((i-1)%13+1<<endl;
}

else if(i<=13){
cout<<"H "<<((i-1)%13+1<<endl;
}

else if(i<=13){
cout<<"C "<<((i-1)%13+1<<endl;
}

else if(i<=13){
cout<<"D "<<((i-1)%13+1<<endl;
}

}
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:1: error: expected '}' before 'else'
   41 | else if(i<=13){
      | ^~~~
a.cc:39:17: note: to match this '{'
   39 | if(hantei[i]==0){
      |                 ^
a.cc:42:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   42 | cout<<"S "<<((i-1)%13+1<<endl;
      |              ~~~~~~~~~~^~~~~~
a.cc:42:30: error: expected ')' before ';' token
   42 | cout<<"S "<<((i-1)%13+1<<endl;
      |             ~                ^
      |                              )
a.cc:46:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   46 | cout<<"H "<<((i-1)%13+1<<endl;
      |              ~~~~~~~~~~^~~~~~
a.cc:46:30: error: expected ')' before ';' token
   46 | cout<<"H "<<((i-1)%13+1<<endl;
      |             ~                ^
      |                              )
a.cc:50:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   50 | cout<<"C "<<((i-1)%13+1<<endl;
      |              ~~~~~~~~~~^~~~~~
a.cc:50:30: error: expected ')' before ';' token
   50 | cout<<"C "<<((i-1)%13+1<<endl;
      |             ~                ^
      |                              )
a.cc:54:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   54 | cout<<"D "<<((i-1)%13+1<<endl;
      |              ~~~~~~~~~~^~~~~~
a.cc:54:30: error: expected ')' before ';' token
   54 | cout<<"D "<<((i-1)%13+1<<endl;
      |             ~                ^
      |                              )
a.cc: At global scope:
a.cc:60:1: error: expected unqualified-id before 'return'
   60 | return 0;
      | ^~~~~~
a.cc:61:1: error: expected declaration before '}' token
   61 | }
      | ^
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main(){
int n,a[53];
int hantei[53];
char b[53];
int c;

for(int i=1;i<53;i++){
hantei[i]=0;
}

cin>>n;

for(int i=1;i<=n;i++){
cin>>b[i]>>a[i];

if(b[i]='S'){
hantei[0+a[i]]=1;
}

if(b[i]='H'){
hantei[13+a[i]]=1;
}

if(b[i]='C'){
hantei[26+a[i]]=1;
}

if(b[i]='D'){
hantei[39+a[i]]=1;
}

}

for(int i=1;i<53;i++){
if(hantei[i]==0){

if(i<=13){
cout<<"S "<<((i-1)%13+1<<endl;
}

else if(i<=26){
cout<<"H "<<((i-1)%13+1<<endl;
}

else if(i<=39){
cout<<"C "<<((i-1)%13+1<<endl;
}

else if(i<=52){
cout<<"D "<<((i-1)%13+1<<endl;
}

}
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   42 | cout<<"S "<<((i-1)%13+1<<endl;
      |              ~~~~~~~~~~^~~~~~
a.cc:42:30: error: expected ')' before ';' token
   42 | cout<<"S "<<((i-1)%13+1<<endl;
      |             ~                ^
      |                              )
a.cc:46:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   46 | cout<<"H "<<((i-1)%13+1<<endl;
      |              ~~~~~~~~~~^~~~~~
a.cc:46:30: error: expected ')' before ';' token
   46 | cout<<"H "<<((i-1)%13+1<<endl;
      |             ~                ^
      |                              )
a.cc:50:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   50 | cout<<"C "<<((i-1)%13+1<<endl;
      |              ~~~~~~~~~~^~~~~~
a.cc:50:30: error: expected ')' before ';' token
   50 | cout<<"C "<<((i-1)%13+1<<endl;
      |             ~                ^
      |                              )
a.cc:54:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   54 | cout<<"D "<<((i-1)%13+1<<endl;
      |              ~~~~~~~~~~^~~~~~
a.cc:54:30: error: expected ')' before ';' token
   54 | cout<<"D "<<((i-1)%13+1<<endl;
      |             ~                ^
      |                              )
Language: C++

#include <iostream>
#include <vector>
using namespace std;

int s[13],h[13],c[13],d[13];
int main(){
	char ID;
	int N,tmp;
	cin>>N;
	for(int i=0;i<N;i++){
		cin>>ID>>tmp;
		if(ID=='S')
		{
			s[tmp]=1;
		}
		if(ID=='H')
		{
			h[tmp]=1;
		}
		if(ID=='C')
		{
			c[tmp]=1;
		}
		if(ID=='D')
		{
			d[tmp]=1;
		}
	}
	for(int i=0;i<13;i++){
		if(s[i]==0)
		cout<<"S "<<i+1<<endl;
	}
		for(int i=0;i<13;i++){
		if(h[i]==0)
		cout<<"H "<<i+1<<endl;
	}
		for(int i=0;i<13;i++){
		if(c[i]==0)
		cout<<"C "<<i+1<<endl;
	}
		for(int i=0;i+1<13;i++){
		if(d[i]==0)
		cout<<"D <<i<<endl;
	}
	return 0;
}

Compiler output:
a.cc:43:23: warning: missing terminating " character
   43 |                 cout<<"D <<i<<endl;
      |                       ^
a.cc:43:23: error: missing terminating " character
   43 |                 cout<<"D <<i<<endl;
      |                       ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:44:9: error: expected primary-expression before '}' token
   44 |         }
      |         ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;

int s[13],h[13],c[13],d[13];
int main(){
	char ID;
	int N,tmp;
	cin>>N;
	for(int i=0;i<N;i++){
		cin>>ID>>tmp;
		tmp--;
		if(ID=='S')
		{
			s[tmp]=1;
		}
		if(ID=='H')
		{
			h[tmp]=1;
		}
		if(ID=='C')
		{
			c[tmp]=1;
		}
		if(ID=='D')
		{
			d[tmp]=1;
		}
	}
	for(int i=0;i<13;i++){
		if(s[i]==0)
		cout<<"S "<<i+1<<endl;
	}
		for(int i=0;i<13;i++){
		if(h[i]==0)
		cout<<"H "<<i+1<<endl;
	}
		for(int i=0;i<13;i++){
		if(c[i]==0)
		cout<<"C "<<i+1<<endl;
	}
		for(int i=0;i<13;i++){
		if(d[i]==0)
		cout<<"D <<i+1<<endl;
	}
	return 0;
}

Compiler output:
a.cc:44:23: warning: missing terminating " character
   44 |                 cout<<"D <<i+1<<endl;
      |                       ^
a.cc:44:23: error: missing terminating " character
   44 |                 cout<<"D <<i+1<<endl;
      |                       ^~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:45:9: error: expected primary-expression before '}' token
   45 |         }
      |         ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n;
	cin >> n;

	int s[13] = { false };
	int h[13] = { false };
	int c[13] = { false };
	int d[13] = { false };

	for (int i = 0; i < n; i++;){
		char mark;
		int x = 0;

		cin >> mark >> x;

		if (mark == 'S'){
			s[i] == true;
		}else if(mark == 'H'){
			h[i] == true;
		}
		else if (mark == 'C'){
			c[i] == true;
		}
		else{
			d[i] == true;
		}
	}

	for (int i = 0; i < 13;i++){
		if(s[i] == false){
			cout << "S" << " " << i << endl;;
		}
	}
	for (int i = 0; i < 13; i++){
		if (h[i] == false){
			cout << "H" << " " << i << endl;;
		}
	}
	for (int i = 0; i < 13; i++){
		if (c[i] == false){
			cout << "C" << " " << i << endl;;
		}
	}
	for (int i = 0; i < 13; i++){
		if (d[i] == false){
			cout << "D" << " " << i << endl;;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:35: error: expected ')' before ';' token
   13 |         for (int i = 0; i < n; i++;){
      |             ~                     ^
      |                                   )
a.cc:13:36: error: expected primary-expression before ')' token
   13 |         for (int i = 0; i < n; i++;){
      |                                    ^
Language: C++

#define _USE_MATH_DEFINES 
#include <cmath>
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<string>
#include<vector>
#define rep(i,start,n) for(int i=start;i<n;i++)
#define And &&
#define Or ||
#define Lb cout<<endl
using namespace std;

int main(void) {
	int n;
	cin >> n;
	int cards[52];
	rep(i, 0, n) {
		cards[i] = 1;
	}
	rep(i, 0, n) {
		char mark;
		int number;
		cin >> mark >> number;
		switch(mark){
		case 'S': cards[number-1] = 0; break;
		case 'H': cards[number + 12] = 0; break;
		case 'C': cards[number + 25] = 0; break;
		case 'D': cards[number + 38] = 0; break;
		}
	}
	rep(i, 0, n) {
		if (cards[i] == 1) {
			switch (i / 13) {
			case 0:cout << "S " << i + 1 << endl; break;
			case 1:cout << "H " << (i + 1) % 13 << endl; break;
			case 2:cout << "C " << (i + 1) % 13 << endl; break;
			case 3:cout << "D " << (i + 1) % 13 << endl; break;
			}
		}
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:10: error: expected '}' at end of input
   41 |         }
      |          ^
a.cc:14:16: note: to match this '{'
   14 | int main(void) {
      |                ^
Language: C++

#include<iostream>
using namespace std;

int main(){
 int n,i,j,rank;
 int cards[4][13];
 char type;

 cin >> n;

 for(i = 0; i < 4; i++){
  for(j = 0; j < 13; j++){
   cards[i][j] = 0;
  }
 }

 for(i = 0; i < n; i++){
  cin >> type >> rank;
  
  switch(type){
   case 'S':
    cards[0][rank] = 1;
    break;
   case 'H':
    cards[1][rank] = 1;
    break;
   case 'C':
    cards[2][rank] = 1;
    break;
   case 'D':
    cards[3][rank] = 1;
    break;
   default:
    break:
  }
 }

 for(i = 0; i < 4; i++){
  for(j = 0; j < 13; j++){
   if(cards[i][j] == 0){
    switch(i){
     case '0':
      cout << 'S' << " " << j+1 << endl;
      break;
     case '0':
      cout << 'H' << " " << j+1 << endl;
      break;
     case '1':
      cout << 'C' << " " << j+1 << endl;
      break;
     case '2':
      cout << 'D' << " " << j+1 << endl;
      break;
     default:
      break;
    }
   }
  }
 }

 return 0;
}
    

 

Compiler output:
a.cc: In function 'int main()':
a.cc:34:10: error: expected ';' before ':' token
   34 |     break:
      |          ^
      |          ;
a.cc:34:10: error: expected primary-expression before ':' token
a.cc:45:6: error: duplicate case value
   45 |      case '0':
      |      ^~~~
a.cc:42:6: note: previously used here
   42 |      case '0':
      |      ^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
 int n,i,j,rank;
 int cards[4][13];
 char type;

 cin >> n;

 for(i = 0; i < 4; i++){
  for(j = 0; j < 13; j++){
   cards[i][j] = 0;
  }
 }

 for(i = 0; i < n; i++){
  cin >> type >> rank;
  
  switch(type){
   case 'S':
    cards[0][rank] = 1;
    break;
   case 'H':
    cards[1][rank] = 1;
    break;
   case 'C':
    cards[2][rank] = 1;
    break;
   case 'D':
    cards[3][rank] = 1;
    break;
   default:
    break;
  }
 }

 for(i = 0; i < 4; i++){
  for(j = 0; j < 13; j++){
   if(cards[i][j] == 0){
    switch(i){
     case '0':
      cout << 'S' << " " << j+1 << endl;
      break;
     case '0':
      cout << 'H' << " " << j+1 << endl;
      break;
     case '1':
      cout << 'C' << " " << j+1 << endl;
      break;
     case '2':
      cout << 'D' << " " << j+1 << endl;
      break;
     default:
      break;
    }
   }
  }
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:6: error: duplicate case value
   45 |      case '0':
      |      ^~~~
a.cc:42:6: note: previously used here
   42 |      case '0':
      |      ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <utility>
using namespace std;

int main(){
	long n;
	cin >> n;
	vector< pair<string, long> > a;
	a.resize(n);
	vector<string> c = {"S", "H", "C", "D"}
	vector< vector<long> > d;
	d.resize(4);
	for (long i = 0; i < n; i++){
		cin >> a[i].first >> a[i].second;
		for (long j = 0; j < 4; j++){
			d[j].resize(13);
			for (long k = 0; k < 13; k++){
				pair<string, long> c;
				c.first = c[j];
				c.second = k + 1;
				if (a[i] == c){
					d[j][k] = 1;
				}
			}
		}
	}
	for (long i = 0; i < 4; i++){
		for (long j = 0; j < 13; j++){
			if (d[i][j] != 1){
				cout << c[i] << " " << (j + 1) << endl;
			}
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected ',' or ';' before 'vector'
   13 |         vector< vector<long> > d;
      |         ^~~~~~
a.cc:14:9: error: 'd' was not declared in this scope
   14 |         d.resize(4);
      |         ^
a.cc:21:44: error: no match for 'operator[]' (operand types are 'std::pair<std::__cxx11::basic_string<char>, long int>' and 'long int')
   21 |                                 c.first = c[j];
      |                                            ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <utility>
using namespace std;

int main(){
	long n;
	cin >> n;
	vector< pair<string, long> > a;
	a.resize(n);
	vector<string> c = {"S", "H", "C", "D"}
	vector< vector<long> > d;
	d.resize(4);
	for (long i = 0; i < n; i++){
		cin >> a[i].first >> a[i].second;
		for (long j = 0; j < 4; j++){
			d[j].resize(13);
			for (long k = 0; k < 13; k++){
				pair<string, long> e;
				e.first = c[j];
				e.second = k + 1;
				if (a[i] == e){
					d[j][k] = 1;
				}
			}
		}
	}
	for (long i = 0; i < 4; i++){
		for (long j = 0; j < 13; j++){
			if (d[i][j] != 1){
				cout << c[i] << " " << (j + 1) << endl;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected ',' or ';' before 'vector'
   13 |         vector< vector<long> > d;
      |         ^~~~~~
a.cc:14:9: error: 'd' was not declared in this scope
   14 |         d.resize(4);
      |         ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;

int main(){
	long n;
	cin >> n;
	vector< pair<long, long> > a(n);
	string b;
	long c;
	long d;
	for (long i = 0; i < n; i++){
		cin >> b >> c;
		switch (b){
			case "S":
				d = 0;
				break;
			case "H":
				d = 1;
				break;
			case "C":
				d = 2;
				break;
			case "D":
				d = 3;
				break;
			default:
				break;
		}
		a[i] = make_pair(d, c);
	}
	sort(a.begin(), a.end());
	vector< pair <long, long> > f(52);
	for (long i = 0; i < 4; i++){
		for (long j = 0; j < 13, j++){
			f[i * 13 + j] = make_pair(i, j + 1);
		}
	}
	vector<long> o(52);
	for (long i = 0; i < 52; i++){
		for (long j = 0; j < n; j++){
			if (a[i] == f[j]){
				o[i] = 1;
				break;
			}
		}
	}
	string e;
	for (long i = 0; i < 52; i++){
		if (o[i] != 1){
			switch (f[i].first){
				case 0:
					e = "S";
					break;
				case 1:
					e = "H";
					break;
				case 2:
					e = "C";
					break;
				case 3:
					e = "D";
					break;
				default:
					break;
			}
			cout << e << " " << f[i].second << endl;
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: switch quantity not an integer
   17 |                 switch (b){
      |                         ^
a.cc:38:45: error: expected ';' before ')' token
   38 |                 for (long j = 0; j < 13, j++){
      |                                             ^
      |                                             ;
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;

int main(){
	long n;
	cin >> n;
	vector< pair<long, long> > a(n);
	string b;
	long c;
	long d;
	for (long i = 0; i < n; i++){
		cin >> b >> c;
		/*
		switch (b){
			case "S":
				d = 0;
				break;
			case "H":
				d = 1;
				break;
			case "C":
				d = 2;
				break;
			case "D":
				d = 3;
				break;
			default:
				break;
		}
		*/
		if (b = "S"){
			d = 0;
		}
		else if (b = "H"){
			d = 1;
		}
		else if (b = "C"){
			d = 2;
		}
		else if (b = "D"){
			d = 3;
		}
		a[i] = make_pair(d, c);
	}
	sort(a.begin(), a.end());
	vector< pair <long, long> > f(52);
	for (long i = 0; i < 4; i++){
		for (long j = 0; j < 13, j++){
			f[i * 13 + j] = make_pair(i, j + 1);
		}
	}
	vector<long> o(52);
	for (long i = 0; i < 52; i++){
		for (long j = 0; j < n; j++){
			if (a[i] == f[j]){
				o[i] = 1;
				break;
			}
		}
	}
	string e;
	for (long i = 0; i < 52; i++){
		if (o[i] != 1){
			switch (f[i].first){
				case 0:
					e = "S";
					break;
				case 1:
					e = "H";
					break;
				case 2:
					e = "C";
					break;
				case 3:
					e = "D";
					break;
				default:
					break;
			}
			cout << e << " " << f[i].second << endl;
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:23: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"S"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   35 |                 if (b = "S"){
      |                     ~~^~~~~
      |                       |
      |                       std::__cxx11::basic_string<char>
a.cc:38:28: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"H"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   38 |                 else if (b = "H"){
      |                          ~~^~~~~
      |                            |
      |                            std::__cxx11::basic_string<char>
a.cc:41:28: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"C"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   41 |                 else if (b = "C"){
      |                          ~~^~~~~
      |                            |
      |                            std::__cxx11::basic_string<char>
a.cc:44:28: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"D"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   44 |                 else if (b = "D"){
      |                          ~~^~~~~
      |                            |
      |                            std::__cxx11::basic_string<char>
a.cc:52:45: error: expected ';' before ')' token
   52 |                 for (long j = 0; j < 13, j++){
      |                                             ^
      |                                             ;
Language: C++

n = int(input())

cards = {

"S" : list(0 for q in range(13)),
"H" : list(0 for w in range(13)),
"C" : list(0 for e in range(13)),
"D" : list(0 for r in range(13)),

}

for _ in range(n):
	a,b = input().split()
	cards[a][int(b)-1] = 1
for a in ("S", "H", "C", "D"):
	for b in range(13):
		if cards[a][b] == 0:
			print(a,b+1)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
a.cc:12:1: error: expected unqualified-id before 'for'
   12 | for _ in range(n):
      | ^~~
Language: C++

n = int(input())

cards = {

"S" : list(0 for _ in range(13)),
"H" : list(0 for _ in range(13)),
"C" : list(0 for _ in range(13)),
"D" : list(0 for _ in range(13)),

}

for _ in range(n):
	a,b = input().split()
	cards[a][int(b)-1] = 1
for a in ("S", "H", "C", "D"):
	for b in range(13):
		if cards[a][b] == 0:
			print(a,b+1)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
a.cc:12:1: error: expected unqualified-id before 'for'
   12 | for _ in range(n):
      | ^~~
Language: C++



cards = {

"S" : list(0 for q in range(13)),
"H" : list(0 for w in range(13)),
"C" : list(0 for e in range(13)),
"D" : list(0 for r in range(13)),

}
n = int(input())
for _ in range(n):
	a,b = input().split()
	cards[a][int(b)-1] = 1
for a in ("S", "H", "C", "D"):
	for b in range(13):
		if cards[a][b] == 0:
			print(a,b+1)

Compiler output:
a.cc:3:1: error: 'cards' does not name a type
    3 | cards = {
      | ^~~~~
a.cc:11:1: error: 'n' does not name a type
   11 | n = int(input())
      | ^
Language: C++

#include<iostream>
#include<iomanip>
using namespace std;

int main(){
	int n,l;
	string suit;
	cin >> n;
	int s[14],h[14],c[14],d[14];
	
	for(int i=0;i<n;i++){
		cin >> suit >> l;
		switch(suit){
			case "S":
				s[l]=1;
				break;
			case "H":
				h[l]=1;
				break;
			case "C":
				c[l]=1;
				break;
			case "D":
				c[l]=1;
				break;
			default:
				break;
		}
	}

	for(int i=1;i<=13;i++){
		if(s[i]!=1){
			cout << "S " << i << endl;
		}
	}

	for(int i=1;i<=13;i++){
		if(h[i]!=1){
			cout << "H " << i << endl;
		}
	}

	for(int i=1;i<=13;i++){
		if(c[i]!=1){
			cout << "C " << i << endl;
		}
	}

	for(int i=1;i<=13;i++){
		if(d[i]!=1){
			cout << "D " << i << endl;
		}
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: switch quantity not an integer
   13 |                 switch(suit){
      |                        ^~~~
Language: C++

#include<iostream>
#include<iomanip>
using namespace std;

int main(){
	int n,v,s[13],h[13],c[13],d[13];
	string suit;
	cin >> n;
	for (i=0;i<n;i++){
		cin >> suit >> v;
		if(suit=="S"){
			s[v-1]=1;
		}else if(suit=="H"){
			h[v-1]=1;
		}else if(suit=="C"){
			c[v-1]=1;
		}else if(suit=="D"){
			d[v-1]=1;
		}
	}
	for (i=0;i<13;i++){
		if(s[i]!=1){
			cout << "S " << i+1 << endl;
		}
	}
	for (i=0;i<13;i++){
		if(h[i]!=1){
			cout << "H " << i+1 << endl;
		}
	}
	for (i=0;i<13;i++){
		if(c[i]!=1){
			cout << "C " << i+1 << endl;
		}
	}
	for (i=0;i<13;i++){
		if(d[i]!=1){
			cout << "D " << i+1 << endl;
		}
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'i' was not declared in this scope
    9 |         for (i=0;i<n;i++){
      |              ^
a.cc:21:14: error: 'i' was not declared in this scope
   21 |         for (i=0;i<13;i++){
      |              ^
a.cc:26:14: error: 'i' was not declared in this scope
   26 |         for (i=0;i<13;i++){
      |              ^
a.cc:31:14: error: 'i' was not declared in this scope
   31 |         for (i=0;i<13;i++){
      |              ^
a.cc:36:14: error: 'i' was not declared in this scope
   36 |         for (i=0;i<13;i++){
      |              ^
Language: C++

#include<iostream>
#include<iomanip>
using namespace std;

int main(){
	int n,lank,s[13],h[13],c[13],d[13];
	string suit;
	cin >> n;
	for (int i=0;i<n;i++){
		cin >> suit >> lank;
		if(suit=="S"){
			s[lank-1]=1;
		}else if(suit=="H"){
			h[lank-1]=1;
		}else if(suit=="C"){
			c[lank-1]=1;
		}else if(suit=="D"){
			d[lank-1]=1;
		}
	}
	for (i=0;i<13;i++){
		if(s[i]!=1){
			cout << "S " << i+1 << endl;
		}
	}
	for (i=0;i<13;i++){
		if(h[i]!=1){
			cout << "H " << i+1 << endl;
		}
	}
	for (i=0;i<13;i++){
		if(c[i]!=1){
			cout << "C " << i+1 << endl;
		}
	}
	for (i=0;i<13;i++){
		if(d[i]!=1){
			cout << "D " << i+1 << endl;
		}
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: 'i' was not declared in this scope
   21 |         for (i=0;i<13;i++){
      |              ^
a.cc:26:14: error: 'i' was not declared in this scope
   26 |         for (i=0;i<13;i++){
      |              ^
a.cc:31:14: error: 'i' was not declared in this scope
   31 |         for (i=0;i<13;i++){
      |              ^
a.cc:36:14: error: 'i' was not declared in this scope
   36 |         for (i=0;i<13;i++){
      |              ^
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
#define MAX 52

int main(void)
{
  bool cards[4][13],n;

  do{
    cin >> n;
  }while(n < 0 || n > MAX);

  int i = 0;

  while(1){
    char stamp;
    int rank;

    cin >> stamp >> rank;

    switch(stamp){
      case 'S':
        cards[0][rank - 1] = true;
        break;
      case 'H':
        cards[1][rank - 1] = true;
        break;
      case 'C':
        cards[2][rank - 1] = true;
        break;
      case 'D':
        cards[3][rank - 1] = true;
        break;
      default:
        break;
    }
  if(i++ == rank - 1) break;
  }

  for(int i = 0;i < rank;i++){
    for(int j = 0;j < 4;j++){
      if(cards[j][i] == true){
        switch(j){
          case 0:
            printf("S ");
            break;
          case 1:
            printf("H ");
            break;
          case 2:
            printf("C ");
            break;
          case 3:
            printf("D ");
            break;
          default:
            break;
        }
        printf("%d\n",i);
      }
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:25: error: missing template arguments before ';' token
   41 |   for(int i = 0;i < rank;i++){
      |                         ^
Language: C++

#include <iostream>
#define S 0
#define H 1
#define C 2
#define D 3
using namespace std;
int AA(int x,int y);
int main(){
  int n
  cin>>n;
  int line[n],A[4][52]={0};
  char word[n];
  for(int i=0;i<n;i++){
    cin>>word[n]>>line[n];
    A[#word[i]][line[i]]=1;
  }
  for(int i=0;i<4;i++){
    for(int ii=0;ii<13;i++){
      if(A[i][ii]==1){
        AA(i,ii);
      }
    }
  }
  return 0;
}

#undef S
#undef H
#undef C
#undef D
#define 0 S
#define 1 H
#define 2 C
#define 3 D

int AA(int x,int y){
  cout<<#x<<" "<<y<<endl;
  return 0;
}

Compiler output:
a.cc:15:7: error: stray '#' in program
   15 |     A[#word[i]][line[i]]=1;
      |       ^
a.cc:31:9: error: macro names must be identifiers
   31 | #define 0 S
      |         ^
a.cc:32:9: error: macro names must be identifiers
   32 | #define 1 H
      |         ^
a.cc:33:9: error: macro names must be identifiers
   33 | #define 2 C
      |         ^
a.cc:34:9: error: macro names must be identifiers
   34 | #define 3 D
      |         ^
a.cc:37:9: error: stray '#' in program
   37 |   cout<<#x<<" "<<y<<endl;
      |         ^
a.cc: In function 'int main()':
a.cc:10:3: error: expected initializer before 'cin'
   10 |   cin>>n;
      |   ^~~
a.cc:11:12: error: 'n' was not declared in this scope
   11 |   int line[n],A[4][52]={0};
      |            ^
a.cc:14:10: error: 'word' was not declared in this scope
   14 |     cin>>word[n]>>line[n];
      |          ^~~~
a.cc:14:19: error: 'line' was not declared in this scope
   14 |     cin>>word[n]>>line[n];
      |                   ^~~~
Language: C++

#include <stdio.h>
int main()
{
  int kls[4][13],n,h,w,kc,kn,cou,hh,hw;
  for(h=0;h<4;h++){
    for(w=0;w<13;w++){
      kls[h][w]=0;
    }
  }
  scanf("%d",n);
  for(cou=0,cou<n;cou++){
    scanf("%d %d",kc,kn);
    if(kc==s){
      kc=0;
    }else
      if(kc==h){
	kc=1;
      }else
	if(kc==c){
	  kc=2;
	}else
	  if(kc==d){
	    kc=3;
	  }
    kls[kc][kn]=1;
  }
  for(h=0;h<4;h++){
    for(w=0;w<13;w++){
      if(kls[h][w]=0){
	if(h==o){
	  hh=s;
	}else
	  if(h==1){
	    hh=h;
	  }else
	    if(h==2){
	      hh=c;
	    }else
	      if(h==3){
		hh=d;
	      }
	hw=w+1;
	printf("%d %d\n",hh,hw);
      }
    }
  }
  return 0;
}
	
     
  
  
	  
	  
	  
	  
	  
	  
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: expected ';' before ')' token
   11 |   for(cou=0,cou<n;cou++){
      |                        ^
      |                        ;
a.cc:13:12: error: 's' was not declared in this scope
   13 |     if(kc==s){
      |            ^
a.cc:19:16: error: 'c' was not declared in this scope; did you mean 'kc'?
   19 |         if(kc==c){
      |                ^
      |                kc
a.cc:22:18: error: 'd' was not declared in this scope
   22 |           if(kc==d){
      |                  ^
a.cc:30:15: error: 'o' was not declared in this scope
   30 |         if(h==o){
      |               ^
a.cc:31:14: error: 's' was not declared in this scope
   31 |           hh=s;
      |              ^
a.cc:37:18: error: 'c' was not declared in this scope; did you mean 'kc'?
   37 |               hh=c;
      |                  ^
      |                  kc
a.cc:40:20: error: 'd' was not declared in this scope
   40 |                 hh=d;
      |                    ^
Language: C++

#include<iostream>
using namespace std;

#define CARD_TYPE 4
#define CARD_RANK 13
#define CARD_MAX 52

enum TYPE
{
	S = 0;
	H = 1;
	C = 2;
	D = 3;
};

int main()
{
	bool data[CARD_TYPE][CARD_RANK] = { false };
	int type, rank;
	int N;
	
	cin >> N;
	for(int i = 0; i < N; i++)
	{
		cin >> type >> rank;
		data[type][rank] = true;
	}
	
	for(int i = 0; i < CARD_TYPE; i++)
	{
		for(int j = 0; j < CARD_RANK; j++)
		{
			if(!(data[i][j]))
			{
				switch((TYPE)i)
				{
				case S:
					cout << "S ";
					break;
				case H:
					cout << "H ";
					break;
				case C:
					cout << "C ";
					break;
				case D:
					cout << "D ";
					break;
				}
				cout << j - 1 << endl;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc:10:14: error: expected '}' before ';' token
   10 |         S = 0;
      |              ^
a.cc:9:1: note: to match this '{'
    9 | {
      | ^
a.cc:11:9: error: 'H' does not name a type
   11 |         H = 1;
      |         ^
a.cc:12:9: error: 'C' does not name a type
   12 |         C = 2;
      |         ^
a.cc:13:9: error: 'D' does not name a type
   13 |         D = 3;
      |         ^
a.cc:14:1: error: expected declaration before '}' token
   14 | };
      | ^
a.cc: In function 'int main()':
a.cc:40:38: error: 'H' was not declared in this scope
   40 |                                 case H:
      |                                      ^
a.cc:43:38: error: 'C' was not declared in this scope
   43 |                                 case C:
      |                                      ^
a.cc:46:38: error: 'D' was not declared in this scope
   46 |                                 case D:
      |                                      ^
Language: C++

#include<iostream>
#include<stdio.h>

using namespace std;

int main() {	
	int n,number=0,cardnum[4][14];
	char Card,dummy;

	scanf_s("%d", &n);

	for (int i = 0; i < n; i++) {
		scanf_s("%c", &dummy);
		scanf_s("%c", &Card);
		scanf_s("%d", &number);
		if (Card == 'S') {
			cardnum[0][number] = 1;
		}
		else if (Card == 'H') {
			cardnum[1][number] = 1;
		}
		else if (Card == 'C') {
			cardnum[2][number] = 1;
		}
		else if (Card == 'D') {
			cardnum[3][number] = 1;
		}
	}

	for (int i = 0; i < 4; i++) {
		for (int j = 1; j <= 13; j++) {
			if (cardnum[i][j] != 1) {
				if (i == 0)printf("S %d\n", j);
				else if (i == 1)printf("H %d\n", j);
				else if (i == 2)printf("C %d\n", j);
				else if (i == 3)printf("D %d\n", j);
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<iostream>

using namespace std;

int main()
{
int n;
cin >> n;

int cards[4][52] = {0};
char p[4] = {'S','H','C','D'};

for (int i = 0; i < n ; i++)
{
char c[52];
int x[52];
cin >> c[i] >> x[i];
}

for (int i = 0; i < n; i++)
{
if (c[i] == 'S')
cards[0][x[i]] = x[i];
else if (c[i] == 'H')
cards[1][x[i]] = x[i];
else if (c[i] == 'C')
cards[2][x[i]] = x[i];
else
cards[3][x[i]] = x[i];
}

for (int i = 0; i < 4; i++)
{for (int j = 0; j < 52; j++)
{
if (int cards[i][j] == 0)
   cout << p[i] << ' ' << j << '\n';
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'c' was not declared in this scope
   22 | if (c[i] == 'S')
      |     ^
a.cc:23:10: error: 'x' was not declared in this scope
   23 | cards[0][x[i]] = x[i];
      |          ^
a.cc:25:10: error: 'x' was not declared in this scope
   25 | cards[1][x[i]] = x[i];
      |          ^
a.cc:27:10: error: 'x' was not declared in this scope
   27 | cards[2][x[i]] = x[i];
      |          ^
a.cc:29:10: error: 'x' was not declared in this scope
   29 | cards[3][x[i]] = x[i];
      |          ^
a.cc:35:9: error: condition declares an array
   35 | if (int cards[i][j] == 0)
      |         ^~~~~
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include<iostream>

using namespace std;

int main()
{
int n;
cin >> n;

int cards[4][52] = {0,0};
char p[4] = {'S','H','C','D'};

for (int i = 0; i < n ; i++)
{
char c[52];
int x[52];
cin >> c[i] >> x[i];
}

for (int i = 0; i < n; i++)
{
if (c[i] == 'S')
cards[0][x[i]] = x[i];
else if (c[i] == 'H')
cards[1][x[i]] = x[i];
else if (c[i] == 'C')
cards[2][x[i]] = x[i];
else
cards[3][x[i]] = x[i];
}

for (int i = 0; i < 4; i++)
{for (int j = 0; j < 52; j++)
{
if (int cards[i][j] == 0)
   cout << p[i] << ' ' << j << '\n';
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'c' was not declared in this scope
   22 | if (c[i] == 'S')
      |     ^
a.cc:23:10: error: 'x' was not declared in this scope
   23 | cards[0][x[i]] = x[i];
      |          ^
a.cc:25:10: error: 'x' was not declared in this scope
   25 | cards[1][x[i]] = x[i];
      |          ^
a.cc:27:10: error: 'x' was not declared in this scope
   27 | cards[2][x[i]] = x[i];
      |          ^
a.cc:29:10: error: 'x' was not declared in this scope
   29 | cards[3][x[i]] = x[i];
      |          ^
a.cc:35:9: error: condition declares an array
   35 | if (int cards[i][j] == 0)
      |         ^~~~~
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include<iostream>

using namespace std;

int main()
{
int n;
cin >> n;

int cards[4][52] = {0};
char p[4] = {'S','H','C','D'};

for (int i = 0; i < n ; i++)
{
char c[52];
int x[52];
cin >> c[i] >> x[i];
}

for (int i = 0; i < n; i++)
{
if (c[i] == 'S')
cards[0][x[i]] = x[i];
else if (c[i] == 'H')
cards[1][x[i]] = x[i];
else if (c[i] == 'C')
cards[2][x[i]] = x[i];
else
cards[3][x[i]] = x[i];
}

for (int i = 0; i < 4; i++)
{for (int j = 0; j < 52; j++)
{
if (cards[i][j] == 0)
   cout << p[i] << ' ' << j << '\n';
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'c' was not declared in this scope
   22 | if (c[i] == 'S')
      |     ^
a.cc:23:10: error: 'x' was not declared in this scope
   23 | cards[0][x[i]] = x[i];
      |          ^
a.cc:25:10: error: 'x' was not declared in this scope
   25 | cards[1][x[i]] = x[i];
      |          ^
a.cc:27:10: error: 'x' was not declared in this scope
   27 | cards[2][x[i]] = x[i];
      |          ^
a.cc:29:10: error: 'x' was not declared in this scope
   29 | cards[3][x[i]] = x[i];
      |          ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include<iostream>

using namespace std;

int main()
{
int n;
cin >> n;

int cards[4][52] = {0};
char p[4] = {'S','H','C','D'};

char c[52];
int x[52];

for (int i = 0; i < n ; i++)
{
cin >> c[i] >> x[i];

if (c[i] == 'S')
cards[0][x[i]] = 1;
else if (c[i] == 'H')
cards[1][x[i]] = 1;
else if (c[i] == 'C')
cards[2][x[i]] = 1;
else
cards[3][x[i]] = 1;
}


for (int i = 0; i < 4; i++)
{for (int j = 0; j < 52; j++)
{
if (cards[i][j] == 0)
   cout << p[i] << ' ' << j << '\n';
}
cout << endl;
}

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

#include<iostream>

using namespace std;

int main()
{
int n;
cin >> n;

int cards[4][52] = {0};
char p[4] = {'S','H','C','D'};

char c[52];
int x[52];

for (int i = 0; i < n ; i++)
{
cin >> c[i] >> x[i];
}

for (int i = 0; i < n; i++)
{
if (c[i] == 'S')
cards[0][x[i]] = 1;
else if (c[i] == 'H')
cards[1][x[i]] = 1;
else if (c[i] == 'C')
cards[2][x[i]] = 1;
else
cards[3][x[i]] = 1;
}



for (int i = 0; i < 4; i++)
{for (int j = 0; j < 52; j++)
{
if (cards[i][j] == 0)
   cout << p[i] << ' ' << j << '\n';
}
cout << endl;
}

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

#include<iostream>

using namespace std;

int main()
{
int n;
cin >> n;

int cards[4][52] = {0};
char p[4] = {'S','H','C','D'};

char c[52];
int x[52];

for (int i = 0; i < n ; i++)
{
cin >> c[i] >> x[i];
}

for (int i = 0; i < n; i++)
{
if (c[i] == 'S')
cards[0][x[i]-1] = 1;
else if (c[i] == 'H')
cards[1][x[i]-1] = 1;
else if (c[i] == 'C')
cards[2][x[i]-1] = 1;
else
cards[3][x[i]-1] = 1;
}



for (int i = 0; i < 4; i++)
{for (int j = 0; j < 52; j++)
{
if (cards[i][j] == 0)
   cout << p[i] << ' ' << j + 1 << '\n';
}
}
cout << endl;
}

for (int i = 0; i < 4; i++)
{for (int j = 0; j < 52; j++)
{
if (cards[i][j] == 0)
   cout << p[i] << ' ' << j + 1<< '\n';
}
}
}

Compiler output:
a.cc:45:1: error: expected unqualified-id before 'for'
   45 | for (int i = 0; i < 4; i++)
      | ^~~
a.cc:45:17: error: 'i' does not name a type
   45 | for (int i = 0; i < 4; i++)
      |                 ^
a.cc:45:24: error: 'i' does not name a type
   45 | for (int i = 0; i < 4; i++)
      |                        ^
a.cc:52:1: error: expected declaration before '}' token
   52 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int n;
  cin >> n;
  int TYPES = 4;
  int NUMBERS = 13;
  bool cards[4][13];
  string type;
  int num;
  for (int i = 0; i < n; i++) {
    cin >> type >> num;
    if (type == "S") {
      cards[0][num - 1] = true;
    } else if (type == "H") {
      cards[1][num - 1] = true;
    } else if (type == "C") {
      cards[2][num - 1] = true;
    } else if (type == "D") {
      cards[3][num - 1] = true;
    }
  }
  for (int i = 0; i < TYPES; i++) {
    for (int j = 0; j < MUMBERS; j++) {
      if (!cards[i][j]) {
        if (i == 0) {
          cout << "S " << j + 1 << endl;
        } else if (i == 1) {
          cout << "H " << j + 1 << endl;
        } else if (i == 2) {
          cout << "C " << j + 1 << endl;
        } else if (i == 3) {
          cout << "D " << j + 1 << endl;
        }
      }
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:25: error: 'MUMBERS' was not declared in this scope; did you mean 'NUMBERS'?
   25 |     for (int j = 0; j < MUMBERS; j++) {
      |                         ^~~~~~~
      |                         NUMBERS
Language: C++

#include <iostream>
using namespace std;
    
int main() {
  int n;
  cin >> n;
  int TYPES = 4;
  int NUMBERS = 13;
  bool cards[TYPES][NUMBERS];
  string type;
  int num;
  for (int i = 0; i < n; i++) {
    cin >> type >> num;
    if (type == "S") {
      cards[0][num - 1] = true;
    } else if (type == "H") {
      cards[1][num - 1] = true;
    } else if (type == "C") {
      cards[2][num - 1] = true;
    } else if (type == "D") {
      cards[3][num - 1] = true;
    }
  }
  for (int i = 0; i < TYPES; i++) {
    for (int j = 0; j < NUMBERS; j++) {
      if (!cards[i][j]) {
        if (i == 0) {
          cout << "S " << j + 1 << endl;
        } else if (i == 1) {
          cout << "H " << j + 1 << endl;
        } else if (i == 2) {
          cout << "C " << j + 1 << endl;
        } else if (i == 3) {
          cout << "D " << j + 1 << endl;
        }
      }
    }
  }
  count << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:3: error: 'count' was not declared in this scope
   39 |   count << endl;
      |   ^~~~~