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

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

                          

Compiler output:
main.c: In function 'main':
main.c:31:22: error: 'S' undeclared (first use in this function)
   31 |                   j= S;
      |                      ^
main.c:31:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:33:22: error: 'H' undeclared (first use in this function)
   33 |                   j= H;
      |                      ^
main.c:35:23: error: 'C' undeclared (first use in this function)
   35 |                   j = C;
      |                       ^
main.c:37:23: error: 'D' undeclared (first use in this function)
   37 |                   j = D;
      |                       ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:14: error: redeclaration of 'card' with no linkage
    5 |          int card[4][13] = {};
      |              ^~~~
main.c:4:12: note: previous declaration of 'card' with type 'int[4][13]'
    4 |        int card[4][13];
      |            ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:14: error: redeclaration of 'card' with no linkage
    5 |          int card[4][13] = {0};
      |              ^~~~
main.c:4:12: note: previous declaration of 'card' with type 'int[4][13]'
    4 |        int card[4][13];
      |            ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:24: error: expected expression before '{' token
    5 |          card[4][13] = {0};
      |                        ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:36:1: error: expected declaration or statement at end of input
   36 | }
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:37:22: error: expected declaration or statement at end of input
   37 |                      }
      |                      ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:42:1: error: expected declaration or statement at end of input
   42 | }
      | ^
Language: C

#include <stdio.h>

void sfact(int);
void hfact(int);
void cfact(int);
void dfact(int);

int s[13],h[13],c[13],d[13];

int main(){
  int i,n,m;
  char c;

  for(i = 0 ; i < 13 ; i++){
    s[i] = 0;
    h[i] = 0;
    c[i] = 0;
    d[i] = 0;
  }
  scanf("%d",&n);
  for(i = 0 ; i < n ; i++){
    scanf("%c %d",&c,&m);
    switch(c){
    case 'S': sfact(m);
      break;
    case 'H': hfact(m);
      break;
    case 'C': cfact(m);
      break;
    case 'D': dfact(m);
      break;
    default: break;
    }
  }
  for(i = 0 ; i < 13 ; i++){
    if(s[i] == 0)
      printf("S %d\n",i+1);
  }
  for(i = 0 ; i < 13 ; i++){
    if(h[i] == 0)
      printf("H %d\n",i+1);
  }
  for(i = 0 ; i < 13 ; i++){
    if(c[i] == 0)
      printf("C %d\n",i+1);
  }
  for(i = 0 ; i < 13 ; i++){
    if(d[i] == 0)
      printf("D %d\n",i+1);
  }
  return 0;
}

void sfact(int i){
  s[i-1] = i;
}
void hfact(int i){
  h[i-1] = i;
}
void cfact(int i){
  c[i-1] = i;
}
void dfact(int i){
  d[i-1] = i;
}

Compiler output:
main.c: In function 'main':
main.c:17:6: error: subscripted value is neither array nor pointer nor vector
   17 |     c[i] = 0;
      |      ^
main.c:44:9: error: subscripted value is neither array nor pointer nor vector
   44 |     if(c[i] == 0)
      |         ^
Language: C

#include <stdio.h>

int main(void)
{
	int a;
	int n;
	int card[4][13] = {{0}};
	int num;
	char mark;
	int i;
	int j;
	int m;
	
	scanf("%d", &n);
	for (a = 1; a <= n; a++){
		scanf(" %c %d", &mark, &num);
		if (mark == 'S'){
			m = 0;
		}
		else if (mark == 'H'){
			m = 1;
		}
		else if (mark == 'C'){
			m = 2;
		}
		else if (mark == 'D'){
			m = 3;
		}
		card[m][num] = 1;
	}
	printf("\n");
	for (i = 0; i < 4; i++){
		for (j = 1; j <= 13; j++){
			if (card[i][j] == 0){
				if (i == 0){
					mark = 'S';
				}
				else if (i == 1){
					mark = 'H';
				}
				else if (i == 2){
					mark = 'C;
				}
				else if (i == 3){
					mark = 'D';
				}
				printf("%c %d\n", mark, j);
			}
		}
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:42:48: warning: missing terminating ' character
   42 |                                         mark = 'C;
      |                                                ^
main.c:42:48: error: missing terminating ' character
   42 |                                         mark = 'C;
      |                                                ^~~
main.c:43:33: error: expected expression before '}' token
   43 |                                 }
      |                                 ^
Language: C

#include <stdio.h>

int main(void){
  int cards[4][13];
  int i,j;
  int r,n;
  char M;
  char Mark[4]={'S','H','C','D'};

  n>0&&n<=52;
 
  for(i=0;i<4;i++){
    for(j=0;j<13;j++){
      cards[i][j]=j+1;
    }
  }

  scanf("%d" ,&n);

     for(i=0;i<n+1;i++){
       scanf("%c %d",&M,&r);
      if(M=='S') cards[0][r-1]=0;
      if(M=='H') cards[1][r-1]=0;
      if(M=='C') cards[2][r-1]=0;
      if(M=='D') cards[3][r-1]=0; 
     }

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


     for(i=0;i<4;i++){
       for(j=0;j<13;j++){
	 if(cards[i][j] !=0){printf("%c %d",Mark[i],cards[i][j]);
	 }
	 printf("\n");
       }
     }

Compiler output:
main.c: In function 'main':
main.c:40:6: error: expected declaration or statement at end of input
   40 |      }
      |      ^
Language: C

#include <stdio.h>
  
int main(void){
  int cards[4][13];
  int i,j;
  int n;
  char M;
  char Mark[4]={'S','H','C','D'};
  

  n<=52;
   
  for(i=0;i<4;i++){
    for(j=0;j<13;j++){
      cards[i][j]=j+1;
    }
  }
  
  scanf("%d" ,&n);

  for(i=0;i<n;i++){
    for(j=0;j<n;j++){
     scanf("%c %d",&M,&j);
     if(M=='S'){
       cards[0][j-1]=0;
       if(i==0) i=='S';}
     
     if(M=='H'){
       cards[1][j-1]=0;
       if(i==1) i=='H';}
     
     if(M=='C'){
       cards[2][j-1]=0;
       if(i==2) i=='C';}
     
     if(M=='D'){
       cards[3][j-1]=0;
       if(i==3) i=='D';}
    }
  }
 
  printf("\n");
  
  for(i=0;i<4;i++){
    for(j=0;j<13;j++){
      if(cards[i][j] !=0){printf("%c %d",Mark[i],cards[i][j]);
	
	printf("\n");}
    }
  }

Compiler output:
main.c: In function 'main':
main.c:50:3: error: expected declaration or statement at end of input
   50 |   }
      |   ^
Language: C

#include <stdio.h>

int main()
{
    int i,j,num;
    int card[4][14];
    char suit;
    char s[]={'S','H','C','D'};
    
    for(i=0;i<4;i++){
        for(j=0;j<14;j++){
            card[i][j]=0;
        }
    }
    
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%c %d",&suit,&num);
        switch(suit){
            case 'S':
                card[0][num] = 1;
                break;
            case 'H':
                card[1][num] = 1;
                break;
            case 'C':
                card[2][num] = 1;
                break;
            case 'D':
                card[3][num] = 1;
                break;
        }
    }
        for(i=0;i<4;i++){
            for(j=1;j<14;j++){
                if(!card[i][j])
                    printf("%c %d\n",s[i],j);
            }
        }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:17: error: 'n' undeclared (first use in this function)
   16 |     scanf("%d",&n);
      |                 ^
main.c:16:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int i,j,n,num;
    int cards[4][13];
    char suit;
    char s[]={'S','H','C','D'};
    
    for(i=0;i<4;i++){
        for(j=0;j<13;j++){
            card[i][j]=0;
        }
    }
    
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%c %d",&suit,&num);
        switch(suit){
            case 'S':
                cards[0][num-1] = 1;
                break;
            case 'H':
                cards[1][num-1] = 1;
                break;
            case 'C':
                cards[2][num-1] = 1;
                break;
            case 'D':
                cards[3][num-1] = 1;
                break;
        }
    }
    for(i=0;i<4;i++){
        for(j=0;j<13;j++){
            if(cards[i][j]==0)
                printf("%c %d\n",s[i],j+1);
        }
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:13: error: 'card' undeclared (first use in this function); did you mean 'cards'?
   13 |             card[i][j]=0;
      |             ^~~~
      |             cards
main.c:13:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h> int main(void)
 {        
  int cards[4][13] = {0};    
  int length,i,j,x,y;    char mark;
    scanf("%d",&length);
    for(i = 0; i < length; i++){
        scanf(" %c%d",&mark,&y);
                 switch(mark){
                 case 'S': x=0; break;
                 case 'H': x=1; break;
                 case 'C': x=2; break;
                 case 'D': x=3;  break;
                 }
        cards[x][y-1] = 1;
      }
    for(i=0; i<4; i++){
        for(j=0; j<13; j++){
            if(cards[i][j]==0){
             switch(i){
                           case0 : printf("S "); break;
                           case1 : printf("H "); break;
                           case2 : printf("C "); break;
                           case3 : printf("D "); break;
             }
        printf("%d\n",j+1);
        }
    }
   }
return 0;
}

Compiler output:
main.c:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> int main(void)
      |                    ^~~
main.c:2:2: error: expected identifier or '(' before '{' token
    2 |  {
      |  ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:35:41: error: expected ';' before '}' token
   35 |                     printf("D %d\n",j+1)
      |                                         ^
      |                                         ;
   36 |                 }
      |                 ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:34:41: error: expected ';' before '}' token
   34 |                     printf("D %d\n",j+1)
      |                                         ^
      |                                         ;
   35 |                 }
      |                 ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:34:43: error: expected ';' before '}' token
   34 |                     printf("D %d\n",(j+1))
      |                                           ^
      |                                           ;
   35 |                 }
      |                 ~
Language: C

#include <stdio.h>

int main(void)
{
	int card[4][13] = {};
	int cnt, num, i, j;
	char mark;
	
	scanf("%d", &cnt);
	
	for (i = 0; i < cnt; i++){
		scanf("%c %d", &mark, &num);
		if(mark == 'S'){
			card[0][num -1] = 1;
		}
		if(mark == 'H'){
			card[1][num -1] = 1;
		}
		if(mark == 'C'){
			card[2][num -1] = 1;
		}
		if(mark == 'D'){
			card[3][num -1] = 1;
		}
	}
	for (j = 0; j < 4; j++){
		for (i = 0; i < 13; i++){
			
			if(j == 0){
				printf("S");
			}
			if(j == 1){a
				printf("H");
			}
			if(j == 2){
				printf("C");
			}
			if(j == 3){
				printf("D");
			}
			printf("%d\n", i+1);
		}
	}
	return (0);
}

	

Compiler output:
main.c: In function 'main':
main.c:32:36: error: unknown type name 'a'
   32 |                         if(j == 1){a
      |                                    ^
main.c:33:40: error: expected declaration specifiers or '...' before string constant
   33 |                                 printf("H");
      |                                        ^~~
Language: C

#include <stdio.h>

int main(){

	int i,j,n;
	char c;
	int x[4][13];

	for(i=0;i<4;i++)
		for(j=0;j<13;j++)
			x[i][j]=1;
	scanf("%d",&n);
	while(n>=0){
		if(scanf("%c %d",&c,&j);
		if(c=='S')
			i=0;
		else if(c=='H')
			i=1;
		else if(c=='C')
			i=2;
		else if(c=='D')
			i=3;
		x[i][j-1]=0;
	}
	for(i=0;i<4;i++)
		for(j=0;j<13;j++)
			if(x[i][j]==1){
				if(i==0)
					c='S';
				else if(i==1)
					c='H';
				else if(i==2)
					c='C';
				else if(i==3)
					c='D';
				printf("%c %d\n",c,j+1);
			}
	//for(i=0;i<=10000000000;i++);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:40: error: expected ')' before ';' token
   14 |                 if(scanf("%c %d",&c,&j);
      |                   ~                    ^
      |                                        )
main.c:24:9: error: expected expression before '}' token
   24 |         }
      |         ^
Language: C

#include<stdio.h>

main(){
     int i,j,num,cnt;
     char mark;
     int card[4][12]={0};

     scanf("%d",&cnt);
     for(i=0;i<cnt;i++){
        if(mark=='S')
            card[0][num-1]=1;
        if(mark=='H')
            card[1][num-1]=1;
        if(mark=='C')
            card[2][num-1]=1;
        if(mark=='D')
            card[3][num-1]=1;
 
    }
    for(i=0;i<4;i++){
        for(j=0;j<13;j++){
            if (cards[i][j]==0) {
               switch(i){
                    case 0;
                    printf("S %d",j+1);
                    break;
                    case 1;
                    printf("H %d",j+1);
                    break;
                    case 2;
                    printf("C %d",j+1);
                    break;
                    case 0;
                    printf("D %d",j+1);
                    break;
            }
         }
     }
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:22:17: error: 'cards' undeclared (first use in this function); did you mean 'card'?
   22 |             if (cards[i][j]==0) {
      |                 ^~~~~
      |                 card
main.c:22:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:27: error: expected ':' or '...' before ';' token
   24 |                     case 0;
      |                           ^
main.c:27:27: error: expected ':' or '...' before ';' token
   27 |                     case 1;
      |                           ^
main.c:30:27: error: expected ':' or '...' before ';' token
   30 |                     case 2;
      |                           ^
main.c:33:27: error: expected ':' or '...' before ';' token
   33 |                     case 0;
      |                           ^
main.c:39:1: error: expected declaration or statement at end of input
   39 | }
      | ^
Language: C

#include<stdio.h>

main(){
     int i,j,num,cnt;
     char mark;
     int card[4][12]={0};

     scanf("%d",&cnt);
     for(i=0;i<cnt;i++){
        if(mark=='S')
            card[0][num-1]=1;
        if(mark=='H')
            card[1][num-1]=1;
        if(mark=='C')
            card[2][num-1]=1;
        if(mark=='D')
            card[3][num-1]=1;
 
    }
    for(i=0;i<4;i++){
        for(j=0;j<13;j++){
            if (cards[i][j]==0) {
               switch(i){
                    case 0;
                    printf("S %d",j+1);
                    break;
                    case 1;
                    printf("H %d",j+1);
                    break;
                    case 2;
                    printf("C %d",j+1);
                    break;
                    case 0;
                    printf("D %d",j+1);
                    break;
            }
         }
     }
}
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:22:17: error: 'cards' undeclared (first use in this function); did you mean 'card'?
   22 |             if (cards[i][j]==0) {
      |                 ^~~~~
      |                 card
main.c:22:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:27: error: expected ':' or '...' before ';' token
   24 |                     case 0;
      |                           ^
main.c:27:27: error: expected ':' or '...' before ';' token
   27 |                     case 1;
      |                           ^
main.c:30:27: error: expected ':' or '...' before ';' token
   30 |                     case 2;
      |                           ^
main.c:33:27: error: expected ':' or '...' before ';' token
   33 |                     case 0;
      |                           ^
Language: C

#include<stdio.h>

main(){
     int i,j,num,cnt;
     char mark;
     int card[4][12]={0};

     scanf("%d",&cnt);
     for(i=0;i<cnt;i++){
        if(mark=='S')
            card[0][num-1]=1;
        if(mark=='H')
            card[1][num-1]=1;
        if(mark=='C')
            card[2][num-1]=1;
        if(mark=='D')
            card[3][num-1]=1;
 
    }
    for(i=0;i<4;i++){
        for(j=0;j<13;j++){
            if (card[i][j]==0) {
               switch(i){
                    case 0;
                    printf("S %d",j+1);
                    break;
                    case 1;
                    printf("H %d",j+1);
                    break;
                    case 2;
                    printf("C %d",j+1);
                    break;
                    case 0;
                    printf("D %d",j+1);
                    break;
            }
         }
     }
}
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:24:27: error: expected ':' or '...' before ';' token
   24 |                     case 0;
      |                           ^
main.c:27:27: error: expected ':' or '...' before ';' token
   27 |                     case 1;
      |                           ^
main.c:30:27: error: expected ':' or '...' before ';' token
   30 |                     case 2;
      |                           ^
main.c:33:27: error: expected ':' or '...' before ';' token
   33 |                     case 0;
      |                           ^
main.c:25:21: warning: statement will never be executed [-Wswitch-unreachable]
   25 |                     printf("S %d",j+1);
      |                     ^~~~~~~~~~~~~~~~~~
Language: C

#include <stdio.h>

int main( void ) {
    int c[ 52 ] = { 0 };
    char s[ 4 ] = { 'S', 'H', 'C', 'D' };
    int n;
    int i;
    char ins;
    int inc;

    scanf( %d", &n );
    for ( i = 0; i < n; i ++ ) {
        scanf( "%c %d", &ins, &inc );
        switch ( ins ) {
          case 'S':
            c[ inc - 1 ] = 1;
            break;
          case 'H':
            c[ 13 + inc - 1 ] = 1;
            break;
          case 'C':
            c[ 13 * 2 + inc - 1 ] = 1;
            break;
          case 'D':
            c[ 13 * 3 + inc - 1 ] = 1;
            break;
        }
    }
    for ( i = 0; i < 52; i ++ ) {
        if ( c[ i ] == 0 ) {
            printf( "%c ", s[ i / 13 ] );
            printf( "%d\n", i % 13 );
        }
    }

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

Compiler output:
main.c: In function 'main':
main.c:11:12: error: expected expression before '%' token
   11 |     scanf( %d", &n );
      |            ^
main.c:11:14: warning: missing terminating " character
   11 |     scanf( %d", &n );
      |              ^
main.c:11:14: error: missing terminating " character
   11 |     scanf( %d", &n );
      |              ^~~~~~~~
main.c:37:14: error: expected ';' before '}' token
   37 |     return 0;
      |              ^
      |              ;
   38 | }
      | ~
Language: C

  for(i=0;i<=n;i++){
    scanf(" %c %d",&mark,&num);
    if(mark=='S'){
      a[0][num-1]=1;
    }
    else if(mark=='H'){
      a[1][num-1]=1;
    }
    else if(mark=='C'){
      a[2][num-1]=1;
    }
    else if(mark=='D'){
      a[3][num-1]=1;
    }
  }
  for(i=0;i<4;i++){
    for(j=0;j<13;j++){
      if(a[i][j]==0){
	if(i==0){
	  printf("S %d\n",j+1);
	}
	else if(i==1){
	  printf("H %d\n",j+1);
	}
	else if(i==2){
	  printf("C %d\n",j+1);
	}
	else if(i==3){
	  printf("D %d\n",j+1);
	}
      }
    }
  }
  return 0;
}

Compiler output:
main.c:1:3: error: expected identifier or '(' before 'for'
    1 |   for(i=0;i<=n;i++){
      |   ^~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
    1 |   for(i=0;i<=n;i++){
      |            ^~
main.c:1:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    1 |   for(i=0;i<=n;i++){
      |                 ^~
main.c:16:3: error: expected identifier or '(' before 'for'
   16 |   for(i=0;i<4;i++){
      |   ^~~
main.c:16:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   16 |   for(i=0;i<4;i++){
      |            ^
main.c:16:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   16 |   for(i=0;i<4;i++){
      |                ^~
main.c:34:3: error: expected identifier or '(' before 'return'
   34 |   return 0;
      |   ^~~~~~
main.c:35:1: error: expected identifier or '(' before '}' token
   35 | }
      | ^
Language: C++

#coding:utf-8
require 'scanf'

$U = []
$P = []

def input_number 
    (gets.scanf "%d")[0]
end

def input
    n = input_number
    n.times do
        $P.push gets.scanf "%s %s"
    end
end

input

T = "SHCD"
T.split("").each do |t|
    ("1".."13").each do |v|
        $U.push [t, v]
    end
end

($U - $P).each do |p|
    printf "%s %s\n", p[0], p[1]
end

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #coding
    1 | #coding:utf-8
      |  ^~~~~~
a.cc:2:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    2 | require 'scanf'
      |         ^~~~~~~
a.cc:2:1: error: 'require' does not name a type
    2 | require 'scanf'
      | ^~~~~~~
Language: C++

#include<cstdio>
using namespace std;

int main(){
int card[4][13];
int n,i,j,num;
for(i=0;i<4;i++)for(j=1;j<=13;j++)card[i][j]=1;
char pattern;
scanf("%d",&n);
for(i=0;i<n;i++){
	scanf("%s %d",&pattern,&num);
	switch(pattern){
	case'S':
			card[0][num]=0;
			break;
	case'H':
			card[1][num]=0;
			break;
	case'C':
			card[2][num]=0;
			break;
	case'D':
			card[3][num]=0;
			break;
	}
}
for(i=0;i<4;i++)for(j=1;j<=13;j++)if(card[i][j]){
	switch(i){
	case(0):
		printf("S %d\n",j);
		break;
	case(1):
		printf("H %d\n",j);
		break;
	case(2):
		printf("C %d\n",j);
		break;
	case(3):
		printf("D %d\n",j);
		break;
	}
}
system("pause");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:1: error: 'system' was not declared in this scope
   43 | system("pause");
      | ^~~~~~
Language: C++

int main(void)
{
	int card[4][13] = {0};
	int n;
	int i;
	char a = {'S', 'H', 'C', 'D'};
	
	for (i = 0; i < n; i++){
		char c, num;
		
		scanf("%c %d", &c, &num);
		switch (c){
			case 'S': card[0][num - 1] = 1; break;
			case 'H': card[1][num - 1] = 1; break;
			case 'C': card[2][num - 1] = 1; break;
			case 'D': card[3][num - 1] = 1; break;
		}
	}
	for (i = 0; i < 4; i++){
		int j;
		for (j = 0; j < 13; j++){
			if (card[i][j] == 1){
				printf("%c %d\n", a[i], j + 1);
			}
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: scalar object 'a' requires one element in initializer
    6 |         char a = {'S', 'H', 'C', 'D'};
      |              ^
a.cc:11:17: error: 'scanf' was not declared in this scope
   11 |                 scanf("%c %d", &c, &num);
      |                 ^~~~~
a.cc:23:33: error: 'printf' was not declared in this scope
   23 |                                 printf("%c %d\n", a[i], j + 1);
      |                                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void)
Language: C++

int main(void)
{
	int card[4][13] = {0};
	int n;
	int i;
	char a[] = {'S', 'H', 'C', 'D'};
	
	for (i = 0; i < n; i++){
		char c, num;
		
		scanf("%c %d", &c, &num);
		switch (c){
			case 'S': card[0][num - 1] = 1; break;
			case 'H': card[1][num - 1] = 1; break;
			case 'C': card[2][num - 1] = 1; break;
			case 'D': card[3][num - 1] = 1; break;
		}
	}
	for (i = 0; i < 4; i++){
		int j;
		for (j = 0; j < 13; j++){
			if (card[i][j] == 1){
				printf("%c %d\n", a[i], j + 1);
			}
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'scanf' was not declared in this scope
   11 |                 scanf("%c %d", &c, &num);
      |                 ^~~~~
a.cc:23:33: error: 'printf' was not declared in this scope
   23 |                                 printf("%c %d\n", a[i], j + 1);
      |                                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void)
Language: C++

s,f[2000];char*p;main(r){for(;~scanf("%c%d",&s,&r);f[s*13+r-1]=1);for(p="SHCD";s=*p++;)for(r=0;r-13;f[s*13+r++]||printf("%c %d\n",s,r));exit(0);}

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s,f[2000];char*p;main(r){for(;~scanf("%c%d",&s,&r);f[s*13+r-1]=1);for(p="SHCD";s=*p++;)for(r=0;r-13;f[s*13+r++]||printf("%c %d\n",s,r));exit(0);}
      | ^
a.cc:1:22: error: expected constructor, destructor, or type conversion before '(' token
    1 | s,f[2000];char*p;main(r){for(;~scanf("%c%d",&s,&r);f[s*13+r-1]=1);for(p="SHCD";s=*p++;)for(r=0;r-13;f[s*13+r++]||printf("%c %d\n",s,r));exit(0);}
      |                      ^
Language: C++

#include<stdio.h>
#include<Math.h>
#include<iostream>
using namespace std;

int main() {
	int i, j, n, a[4][13], m;
	char c;

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

	cin >> n;

	while(n) {
		n--;
		cin >> c >> m;
		if (c == 'S') {
			a[0][m-1] = 0;
		}else if (c == 'H') {
			a[1][m-1] = 0;
		}else if (c == 'C') {
			a[2][m-1] = 0;
		}else a[3][m-1] = 0;
	}

	for (i = 0; i < 4; i++) {
		for (j = 0; j < 13; j++) {
			if (i == 0 && a[0][j] != 0) cout << "S " << a[0][j] << endl;
			if (i == 1 && a[1][j] != 0) cout << "H " << a[1][j] << endl;
			if (i == 2 && a[2][j] != 0) cout << "C " << a[2][j] << endl;
			if (i == 3 && a[3][j] != 0) cout << "D " << a[3][j] << endl;
		}
	}
}

Compiler output:
a.cc:2:9: fatal error: Math.h: No such file or directory
    2 | #include<Math.h>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<stdio.h>
#include<Math.h>
using namespace std;

int main() {
	int i, j, n, a[4][13], m;
	char c;

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

	cin >> n;

	while(n) {
		n--;
		cin >> c >> m;
		if (c == 'S') {
			a[0][m-1] = 0;
		}else if (c == 'H') {
			a[1][m-1] = 0;
		}else if (c == 'C') {
			a[2][m-1] = 0;
		}else a[3][m-1] = 0;
	}

	for (i = 0; i < 4; i++) {
		for (j = 0; j < 13; j++) {
			if (i == 0 && a[0][j] != 0) cout << "S " << a[0][j] << endl;
			if (i == 1 && a[1][j] != 0) cout << "H " << a[1][j] << endl;
			if (i == 2 && a[2][j] != 0) cout << "C " << a[2][j] << endl;
			if (i == 3 && a[3][j] != 0) cout << "D " << a[3][j] << endl;
		}
	}
}

Compiler output:
a.cc:3:9: fatal error: Math.h: No such file or directory
    3 | #include<Math.h>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <stdio.h>
#include <Math.h>
using namespace std;

int main() {
	int i, j, n, a[4][13], m;
	char c;

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

	cin >> n;

	while(n) {
		n--;
		cin >> c >> m;
		if (c == 'S') {
			a[0][m-1] = 0;
		}else if (c == 'H') {
			a[1][m-1] = 0;
		}else if (c == 'C') {
			a[2][m-1] = 0;
		}else a[3][m-1] = 0;
	}

	for (i = 0; i < 4; i++) {
		for (j = 0; j < 13; j++) {
			if (i == 0 && a[0][j] != 0) cout << "S " << a[0][j] << endl;
			if (i == 1 && a[1][j] != 0) cout << "H " << a[1][j] << endl;
			if (i == 2 && a[2][j] != 0) cout << "C " << a[2][j] << endl;
			if (i == 3 && a[3][j] != 0) cout << "D " << a[3][j] << endl;
		}
	}
}

Compiler output:
a.cc:3:10: fatal error: Math.h: No such file or directory
    3 | #include <Math.h>
      |          ^~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<stdio.h>
#include<Math.h>
using namespace std;

int main() {
	int i, j, n, a[4][13], m;
	char c;

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

	cin >> n;

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

	for (i = 0; i < 4; i++) {
		for (j = 0; j < 13; j++) {
			if (i == 0 && a[0][j] != 0) cout << "S " << a[0][j] << endl;
			if (i == 1 && a[1][j] != 0) cout << "H " << a[1][j] << endl;
			if (i == 2 && a[2][j] != 0) cout << "C " << a[2][j] << endl;
			if (i == 3 && a[3][j] != 0) cout << "D " << a[3][j] << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc:3:9: fatal error: Math.h: No such file or directory
    3 | #include<Math.h>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<string>
#include<stdio.h>
#include<Math.h>
using namespace std;

int main() {
	int i, j, n, a[4][13], m;
	char c;

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

	cin >> n;

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

	for (i = 0; i < 4; i++) {
		for (j = 0; j < 13; j++) {
			if (i == 0 && a[0][j] != 0) cout << "S " << a[0][j] << endl;
			if (i == 1 && a[1][j] != 0) cout << "H " << a[1][j] << endl;
			if (i == 2 && a[2][j] != 0) cout << "C " << a[2][j] << endl;
			if (i == 3 && a[3][j] != 0) cout << "D " << a[3][j] << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc:4:9: fatal error: Math.h: No such file or directory
    4 | #include<Math.h>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <string>
#include <stdio.h>
#include <Math.h>
using namespace std;

int main() {
	int i, j, n, a[4][13], m;
	char c;

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

	cin >> n;

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

	for (i = 0; i < 4; i++) {
		for (j = 0; j < 13; j++) {
			if (i == 0 && a[0][j] != 0) cout << "S " << a[0][j] << endl;
			if (i == 1 && a[1][j] != 0) cout << "H " << a[1][j] << endl;
			if (i == 2 && a[2][j] != 0) cout << "C " << a[2][j] << endl;
			if (i == 3 && a[3][j] != 0) cout << "D " << a[3][j] << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc:4:10: fatal error: Math.h: No such file or directory
    4 | #include <Math.h>
      |          ^~~~~~~~
compilation terminated.
Language: C++

#include <cstdio>

using namespace std;

int main() {
	int n;
	scanf("%d", &n);

	bool[][] card = new bool[4][13];
	char mark;
	int number;
	for (int i = 0; i < n; i++) {
		scanf("%c%d", &mark, &number);
		switch(mark) {
			case 'S':
				card[0][number-1] = true;
				break;
			case 'H':
				card[1][number-1] = true;
				break;
			case 'C':
				card[2][number-1] = true;
				break;
			case 'D':
				card[3][number-1] = true;
				break;
		}
	}

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: structured binding declaration cannot have type 'bool'
    9 |         bool[][] card = new bool[4][13];
      |             ^~
a.cc:9:13: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:9:13: error: empty structured binding declaration
a.cc:9:15: error: expected initializer before '[' token
    9 |         bool[][] card = new bool[4][13];
      |               ^
a.cc:16:33: error: 'card' was not declared in this scope
   16 |                                 card[0][number-1] = true;
      |                                 ^~~~
a.cc:32:30: error: 'card' was not declared in this scope
   32 |                         if (!card[i][j]) {
      |                              ^~~~
Language: C++

#include <iostream>
using namespace std;

bool tbl[4][13];
int main(){
	memset(tbl, false, sizeof(tbl));
	int exists;
	cin >> exists;
	while(exists-- > 0){
		char c;
		int lev;
		cin >> c;
		cin >> lev;
		--lev;
		switch(c){
		case 'S':
			tbl[0][lev] = true;
			break;
		case 'H':
			tbl[1][lev] = true;
			break;
		case 'C':
			tbl[2][lev] = true;
			break;
		case 'D':
			tbl[3][lev] = true;
			break;
		}
	}

	for(int g=0; g<4; g++)
		for(int l=0; l<13; l++){
			if(!tbl[g][l]){
				cout << static_cast<char>("SHCD"[g]) << " ";
				cout << (l+1) << endl;
			}
		}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'memset' was not declared in this scope
    6 |         memset(tbl, false, sizeof(tbl));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <cstdio>

int main()
{
static bool s[13], h[13], c[13], d[13];
int n;
scanf("%d", &n);
for(int i = 0; i < n; ++i) {
int t;
char str[32], c;
scanf("%s%d", str, &t);
c = str[0];
if(c == 'S') s[t - 1] = true;
if(c == 'H') h[t - 1] = true;
if(c == 'C') c[t - 1] = true;
if(c == 'D') d[t - 1] = true:
}
for(int i = 0; i < 13; ++i) {
if(s[i]) printf("S %d\n", i + 1);
}
for(int i = 0; i < 13; ++i) {
if(h[i]) printf("H %d\n", i + 1);
}
for(int i = 0; i < 13; ++i) {
if(c[i]) printf("C %d\n", i + 1);
}
for(int i = 0; i < 13; ++i) {
if(d[i]) printf("D %d\n", i + 1);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: invalid types 'char[int]' for array subscript
   15 | if(c == 'C') c[t - 1] = true;
      |               ^
a.cc:16:29: error: expected ';' before ':' token
   16 | if(c == 'D') d[t - 1] = true:
      |                             ^
      |                             ;
Language: C++

#include <cstdio>

int main()
{
static bool s[13], h[13], c[13], d[13];
int n;
scanf("%d", &n);
for(int i = 0; i < n; ++i) {
int t;
char str[32];
char c;
scanf("%s%d", str, &t);
c = str[0];
if(c == 'S') s[t - 1] = true;
if(c == 'H') h[t - 1] = true;
if(c == 'C') c[t - 1] = true;
if(c == 'D') d[t - 1] = true:
}
for(int i = 0; i < 13; ++i) {
if(s[i]) printf("S %d\n", i + 1);
}
for(int i = 0; i < 13; ++i) {
if(h[i]) printf("H %d\n", i + 1);
}
for(int i = 0; i < 13; ++i) {
if(c[i]) printf("C %d\n", i + 1);
}
for(int i = 0; i < 13; ++i) {
if(d[i]) printf("D %d\n", i + 1);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: invalid types 'char[int]' for array subscript
   16 | if(c == 'C') c[t - 1] = true;
      |               ^
a.cc:17:29: error: expected ';' before ':' token
   17 | if(c == 'D') d[t - 1] = true:
      |                             ^
      |                             ;
Language: C++

#include <cstdio>

int main()
{
static bool s[13], h[13], c[13], d[13];
int n;
scanf("%d", &n);
for(int i = 0; i < n; ++i) {
int t;
char str[32];
char c;
scanf("%s%d", str, &t);
c = str[0];
if(c == 'S') s[t - 1] = true;
if(c == 'H') h[t - 1] = true;
if(c == 'C') c[t - 1] = true;
if(c == 'D') d[t - 1] = true;
}
for(int i = 0; i < 13; ++i) {
if(s[i]) printf("S %d\n", i + 1);
}
for(int i = 0; i < 13; ++i) {
if(h[i]) printf("H %d\n", i + 1);
}
for(int i = 0; i < 13; ++i) {
if(c[i]) printf("C %d\n", i + 1);
}
for(int i = 0; i < 13; ++i) {
if(d[i]) printf("D %d\n", i + 1);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: invalid types 'char[int]' for array subscript
   16 | if(c == 'C') c[t - 1] = true;
      |               ^
Language: C++

#include<stdio.h>
#include<string.h>

int ctoi(char);
char itoc(int);
int cards[4][13];
int main(){
  int pc,n,i,j,un,num;
  char c,*ind,inp[256];
  fgets(inp,256,stdin);
  un=atoi(inp);
  for(i=0;i<un;i++){
    fgets(inp,256,stdin);
    ind=strchr(inp,' ');
    *ind='\0';
    cards[ctoi(inp[0])][atoi(ind+1)-1]=1;
  }
  for(i=0;i<4;i++){
    for(j=0;j<13;j++){
      if(cards[i][j]==0) printf("%c %d\n",itoc(i),j+1);
    }
  }
  return 0;
}
char itoc(int n){
  switch(n){
  case 0:
    return 'S';
  case 1:
    return 'H';
  case 2:
    return 'C';
  case 3:
    return 'D';
  }
  return '?';
}
int ctoi(char c){
  switch(c){
  case 'S':
    return 0;
  case 'H':
    return 1;
  case 'C':
    return 2;
  case 'D':
    return 3;
  }
  return -1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 'atoi' was not declared in this scope; did you mean 'ctoi'?
   11 |   un=atoi(inp);
      |      ^~~~
      |      ctoi
Language: C++

#include<iostream>
using namespace std;

bool c[4][14];

int main(){
int n,d;
char s;
cin >> n;
for(int i=0;i<n;i++){
cin >> s >> d;
if(s=='S')c[0][d] = true;
if(s=='H')c[1][d] = true;
if(s=='C')c[2][d] = true;
if(s=='D')c[3][d] = true;
}

for(int i=0;i<4;i++){
for(int j=1;j<=13;j++){
if(!c[i][j]){
if(i==0)cout << "S " << j << endl;
if(i==1)cout << "H " << j << endl;
if(i==2)cout << "C " << j << endl;
if(i==3)cout << "D " << j << endl;
}
}
} 

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

n = gets.chomp.to_i

a = []
n.times{ a << gets.chomp }

b = []
['S', 'H', 'C', 'D'].each do |c|
  13.times{ |i| b << [c, i+1].join(' ') }
end

puts b - a

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = gets.chomp.to_i
      | ^
a.cc:6:1: error: 'b' does not name a type
    6 | b = []
      | ^
a.cc:9:1: error: 'end' does not name a type
    9 | end
      | ^~~