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

include <stdio.h>

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



Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
    int n;
    cin>>n;
    int card[4][13]={};
    for(int i=0;i<n;i++){
        string suit;
        int num;
        cin>>suit>>num;
        
        if(suit=="S")card[0][num-1]=1;
        if(suit=="H")card[1][num-1]=1;
        if(suit=="C")card[2][num-1]=1;
        if(suit=="D")card[3][num-1]=1;
    }
    
    string str[4]={"S","H","C","D"};
    for(int i=0;i<4;i++){
        for(int j=0;j<13;j++){
            if(card[i][j]==1)continue;
            cout<<str[i]<<" "<<j+1<<endl;
            
        }
    }
        
    return 0
}

}



Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: expected ';' before '}' token
   28 |     return 0
      |             ^
      |             ;
   29 | }
      | ~            
a.cc: At global scope:
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    int n;
    cin>>n;
    int card[4][13]={};
    for(int i=0;i<n;i++){
        string suit;
        int num;
        cin>>suit>>num;
        
        if(suit=="S")card[0][num-1]=1;
        if(suit=="H")card[1][num-1]=1;
        if(suit=="C")card[2][num-1]=1;
        if(suit=="D")card[3][num-1]=1;
    }
    
    string str[4]={"S","H","C","D"};
    for(int i=0;i<4;i++){
        for(int j=0;j<13;j++){
            if(card[i][j]==1)continue;
            cout<<str[i]<<" "<<j+1<<endl;
            
        }
    }
        
    return 0
}



Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: expected ';' before '}' token
   28 |     return 0
      |             ^
      |             ;
   29 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,a,c;
    char b;
    cin>>n;
    int a[4][13]={};

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


}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: conflicting declaration 'int a [4][13]'
    8 |     int a[4][13]={};
      |         ^
a.cc:5:11: note: previous declaration as 'int a'
    5 |     int n,a,c;
      |           ^
a.cc:12:14: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   12 |         if(b="S")a[1][c]=1;
      |              ^~~
      |              |
      |              const char*
a.cc:12:19: error: invalid types 'int[int]' for array subscript
   12 |         if(b="S")a[1][c]=1;
      |                   ^
a.cc:13:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   13 |         else if(b="H")a[2][c]=1;
      |                   ^~~
      |                   |
      |                   const char*
a.cc:13:24: error: invalid types 'int[int]' for array subscript
   13 |         else if(b="H")a[2][c]=1;
      |                        ^
a.cc:14:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   14 |         else if(b="C")a[3][c]=1;
      |                   ^~~
      |                   |
      |                   const char*
a.cc:14:24: error: invalid types 'int[int]' for array subscript
   14 |         else if(b="C")a[3][c]=1;
      |                        ^
a.cc:15:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   15 |         else if(b="D")a[4][c]=1;
      |                   ^~~
      |                   |
      |                   const char*
a.cc:15:24: error: invalid types 'int[int]' for array subscript
   15 |         else if(b="D")a[4][c]=1;
      |                        ^
a.cc:18:13: error: invalid types 'int[int]' for array subscript
   18 |         if(a[1][i]=0)cout<<"S"<<" "<<i;
      |             ^
a.cc:19:18: error: invalid types 'int[int]' for array subscript
   19 |         else if(a[2][i]=0)cout<<"H"<<" "<<i;
      |                  ^
a.cc:20:18: error: invalid types 'int[int]' for array subscript
   20 |         else if(a[3][i]=0)cout<<"C"<<" "<<i;
      |                  ^
a.cc:21:18: error: invalid types 'int[int]' for array subscript
   21 |         else if(a[4][i]=0)cout<<"D"<<" "<<i;
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,a,c;
    string b;
    cin>>n;
    int a[4][13];

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


}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: conflicting declaration 'int a [4][13]'
    8 |     int a[4][13];
      |         ^
a.cc:5:11: note: previous declaration as 'int a'
    5 |     int n,a,c;
      |           ^
a.cc:12:13: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"S"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 |         if(b="S"){a[1][c]=1;}
      |            ~^~~~
      |             |
      |             std::__cxx11::basic_string<char>
a.cc:12:20: error: invalid types 'int[int]' for array subscript
   12 |         if(b="S"){a[1][c]=1;}
      |                    ^
a.cc:13:18: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"H"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |         else if(b="H"){a[2][c]=1;}
      |                 ~^~~~
      |                  |
      |                  std::__cxx11::basic_string<char>
a.cc:13:25: error: invalid types 'int[int]' for array subscript
   13 |         else if(b="H"){a[2][c]=1;}
      |                         ^
a.cc:14:18: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"C"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |         else if(b="C"){a[3][c]=1;}
      |                 ~^~~~
      |                  |
      |                  std::__cxx11::basic_string<char>
a.cc:14:25: error: invalid types 'int[int]' for array subscript
   14 |         else if(b="C"){a[3][c]=1;}
      |                         ^
a.cc:15:18: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"D"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   15 |         else if(b="D"){a[4][c]=1;}
      |                 ~^~~~
      |                  |
      |                  std::__cxx11::basic_string<char>
a.cc:15:25: error: invalid types 'int[int]' for array subscript
   15 |         else if(b="D"){a[4][c]=1;}
      |                         ^
a.cc:18:13: error: invalid types 'int[int]' for array subscript
   18 |         if(a[1][i]=0){cout<<"S"<<" "<<i;}
      |             ^
a.cc:19:18: error: invalid types 'int[int]' for array subscript
   19 |         else if(a[2][i]=0){cout<<"H"<<" "<<i;}
      |                  ^
a.cc:20:18: error: invalid types 'int[int]' for array subscript
   20 |         else if(a[3][i]=0){cout<<"C"<<" "<<i;}
      |                  ^
a.cc:21:18: error: invalid types 'int[int]' for array subscript
   21 |         else if(a[4][i]=0){cout<<"D"<<" "<<i;}
      |                  ^
Language: C++

#include<bits/stdc++.h>
uaing namespace std;

int main{
  int n;
  int card[4][13]={};
  
  cin>>n;

  for (int i=0;i<n;i++){
    string suit;
    int num;

    if(suit == "S")card[0][num-1]=1;
    if(suit == "H")card[1][num-1]=1;
    if(suit == "C")card[2][num-1]=1;
    if(suit == "D")card[3][num-1]=1;
  }
  string str[4]={"S","H","C","D"};
  for(int i=0;i<4;i++){
    for(int j=0;j<13;j++){
      if(card[i][j]==1) continue;
      cout<<str[i]<<" "<<j+1<<endl;
    }
  }

  return 0;

  
}


Compiler output:
a.cc:2:1: error: 'uaing' does not name a type
    2 | uaing namespace std;
      | ^~~~~
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int n;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:8:3: error: 'cin' does not name a type
    8 |   cin>>n;
      |   ^~~
a.cc:10:3: error: expected unqualified-id before 'for'
   10 |   for (int i=0;i<n;i++){
      |   ^~~
a.cc:10:16: error: 'i' does not name a type
   10 |   for (int i=0;i<n;i++){
      |                ^
a.cc:10:20: error: 'i' does not name a type
   10 |   for (int i=0;i<n;i++){
      |                    ^
a.cc:19:3: error: 'string' does not name a type; did you mean 'stdin'?
   19 |   string str[4]={"S","H","C","D"};
      |   ^~~~~~
      |   stdin
a.cc:20:3: error: expected unqualified-id before 'for'
   20 |   for(int i=0;i<4;i++){
      |   ^~~
a.cc:20:15: error: 'i' does not name a type
   20 |   for(int i=0;i<4;i++){
      |               ^
a.cc:20:19: error: 'i' does not name a type
   20 |   for(int i=0;i<4;i++){
      |                   ^
a.cc:27:3: error: expected unqualified-id before 'return'
   27 |   return 0;
      |   ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

#include<bits/stdc++.h>
uaing namespace std;

int main{
  int n;
  int card[4][13]={};
  
  cin>>n;

  for(int i=0;i<n;i++){
    string suit;
    int num;

    if(suit == "S")card[0][num-1]=1;
    if(suit == "H")card[1][num-1]=1;
    if(suit == "C")card[2][num-1]=1;
    if(suit == "D")card[3][num-1]=1;
  }
  string str[4]={"S","H","C","D"};
  for(int i=0;i<4;i++){
    for(int j=0;j<13;j++){
      if(card[i][j]==1)continue;
      cout<<str[i]<<" "<<j+1<<endl;
    }
  }

  return 0;

  
}


Compiler output:
a.cc:2:1: error: 'uaing' does not name a type
    2 | uaing namespace std;
      | ^~~~~
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int n;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:8:3: error: 'cin' does not name a type
    8 |   cin>>n;
      |   ^~~
a.cc:10:3: error: expected unqualified-id before 'for'
   10 |   for(int i=0;i<n;i++){
      |   ^~~
a.cc:10:15: error: 'i' does not name a type
   10 |   for(int i=0;i<n;i++){
      |               ^
a.cc:10:19: error: 'i' does not name a type
   10 |   for(int i=0;i<n;i++){
      |                   ^
a.cc:19:3: error: 'string' does not name a type; did you mean 'stdin'?
   19 |   string str[4]={"S","H","C","D"};
      |   ^~~~~~
      |   stdin
a.cc:20:3: error: expected unqualified-id before 'for'
   20 |   for(int i=0;i<4;i++){
      |   ^~~
a.cc:20:15: error: 'i' does not name a type
   20 |   for(int i=0;i<4;i++){
      |               ^
a.cc:20:19: error: 'i' does not name a type
   20 |   for(int i=0;i<4;i++){
      |                   ^
a.cc:27:3: error: expected unqualified-id before 'return'
   27 |   return 0;
      |   ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main{
  int n;
  int card[4][13]={};
  
  cin>>n;

  for(int i=0;i<n;i++){
    string suit;
    int num;

    if(suit == "S")card[0][num-1]=1;
    if(suit == "H")card[1][num-1]=1;
    if(suit == "C")card[2][num-1]=1;
    if(suit == "D")card[3][num-1]=1;
  }
  string str[4]={"S","H","C","D"};
  for(int i=0;i<4;i++){
    for(int j=0;j<13;j++){
      if(card[i][j]==1)continue;
      cout<<str[i]<<" "<<j+1<<endl;
    }
  }

  return 0;

  
}


Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int n;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:8:3: error: 'cin' does not name a type
    8 |   cin>>n;
      |   ^~~
a.cc:10:3: error: expected unqualified-id before 'for'
   10 |   for(int i=0;i<n;i++){
      |   ^~~
a.cc:10:15: error: 'i' does not name a type
   10 |   for(int i=0;i<n;i++){
      |               ^
a.cc:10:19: error: 'i' does not name a type
   10 |   for(int i=0;i<n;i++){
      |                   ^
a.cc:20:3: error: expected unqualified-id before 'for'
   20 |   for(int i=0;i<4;i++){
      |   ^~~
a.cc:20:15: error: 'i' does not name a type
   20 |   for(int i=0;i<4;i++){
      |               ^
a.cc:20:19: error: 'i' does not name a type
   20 |   for(int i=0;i<4;i++){
      |                   ^
a.cc:27:3: error: expected unqualified-id before 'return'
   27 |   return 0;
      |   ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

int main(){
	int n ;
	cin >>n;
	int x[n];
	char s[n];
	int y[52] ={0};
	for(int i =0;i<n;i++){
		cin>>s[i] >>x[i];
	}
	for(int j=0;j<n;j++){
		int p =x[j];
			int a =p-1;
			int b =p +12;
			int c =p+ 25;
			int d = p+38;
		if(s[j] =='S'){
			 x[j] =y[a];
		}
		else if(s[j] =='H'){
			x[j] = y[b];
		}
		else if(s[j] =='C'){
			x[j] = y[c];
		}
		else if(s[j] =='D'){
			x[j] = y[d];
		}
	}
	for(int r =0;r <52;r++){
		if(y[r] == 0){
			if(r <13){
				cout <<'S'<<" "<<r +1 <<"\n";
			}
			else if (r>12 &&r <26){
				cout <<'H'<<" "<<r -12 <<"\n";
			}
			else if (r >25 && r <39){
				cout <<'C'<<" "<<r -25<<"\n";
			}
			else if (r>38){
				cout <<'D'<<" "<<r -38<<"\n";
			}
		}
	}

return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >>n;
      |         ^~~
a.cc:32:33: error: 'cout' was not declared in this scope
   32 |                                 cout <<'S'<<" "<<r +1 <<"\n";
      |                                 ^~~~
a.cc:35:33: error: 'cout' was not declared in this scope
   35 |                                 cout <<'H'<<" "<<r -12 <<"\n";
      |                                 ^~~~
a.cc:38:33: error: 'cout' was not declared in this scope
   38 |                                 cout <<'C'<<" "<<r -25<<"\n";
      |                                 ^~~~
a.cc:41:33: error: 'cout' was not declared in this scope
   41 |                                 cout <<'D'<<" "<<r -38<<"\n";
      |                                 ^~~~
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

void outPut(int Array[],char suit){
    for(int i = 1; i <= 13; i++){
        if(Array[i] == 0) printf("%c %d\n",suit,i);
    }
}

int main(){
    int n, S[14], H[14], D[14], C[14], buf;
    char suit;
    cin >> n;
    S = H = D = C = {0};
    for(int i = 0; i < n; i++){
        scanf("%s %d", suit, &buf);
        
        switch (suit)
        {
            case 'S':
                S[buf] = 1;
                break;
            case 'H':
                H[buf] = 1;
                break;
            case 'D':
                D[buf] = 1;
                break;
            case 'C':
                C[buf] = 1;
                break;
        }
    } 
    outPut(S,'S');
    outPut(H,'H');
    outPut(C,'C');
    outPut(D,'D');
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: assigning to an array from an initializer list
   16 |     S = H = D = C = {0};
      |                 ~~^~~~~
Language: C++

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



Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> n ;
      |         ^~~
a.cc:16:42: error: 'cout' was not declared in this scope
   16 |                 if ( card[0][i-1] != 1 ) cout << "S " << i << endl ;
      |                                          ^~~~
a.cc:16:63: error: 'endl' was not declared in this scope
   16 |                 if ( card[0][i-1] != 1 ) cout << "S " << i << endl ;
      |                                                               ^~~~
a.cc:20:42: error: 'cout' was not declared in this scope
   20 |                 if ( card[1][i-1] != 1 ) cout << "H " << i << endl ;
      |                                          ^~~~
a.cc:20:63: error: 'endl' was not declared in this scope
   20 |                 if ( card[1][i-1] != 1 ) cout << "H " << i << endl ;
      |                                                               ^~~~
a.cc:24:42: error: 'cout' was not declared in this scope
   24 |                 if ( card[2][i-1] != 1 ) cout << "C " << i << endl ;
      |                                          ^~~~
a.cc:24:63: error: 'endl' was not declared in this scope
   24 |                 if ( card[2][i-1] != 1 ) cout << "C " << i << endl ;
      |                                                               ^~~~
a.cc:28:42: error: 'cout' was not declared in this scope
   28 |                 if ( card[3][i-1] != 1 ) cout << "D " << i << endl ;
      |                                          ^~~~
a.cc:28:63: error: 'endl' was not declared in this scope
   28 |                 if ( card[3][i-1] != 1 ) cout << "D " << i << endl ;
      |                                                               ^~~~
Language: C++

#include<iostream>
using namespace std;
int main (){
	int mouth[4][13],value;
	int n;
	cin>>n;
	char ch;
	int x;
	for(int i=0;i<=n;i++){
		cin>>ch>>x;
		if(ch == 'S'){
			mouth[0][x-1]=true;
		}
		else if(ch == 'H'){
			mouth[1][x-1]=true;
		}
		else if(ch == 'C'){
			mouth[2][x-1]=true;
		}
		else if(ch == 'D'){
			mouth[3][x-1]=true;
		}
	}
	for(int y=0;y<=3;){
		for(int xx=0;xx<=12;){
	       if(mouth[y][xx]==false){
			   if(y==0){
				   cout<<"S "<<xx+1<<endl;
			   }
			   else if (y==1){
				   cout<<"H "<<xx+1<<endl;
			   }
			   else if(y==2){
				   cout<<"C "<<xx+1<<endl;
			   }
			   else if(y==3){
				   cout<<"D "<<xx+1<<endl;
			   }
		}
	}
return 0;
}


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

#include<iostream>
using namespace std;
int main (){
	bool mouth[4][13],value;
	int n;
	cin>>n;
	char ch;
	int x;
	for(int i=0;i<=4;i++){
		for(int j=0;j<=13;j++){
		cin>>ch>>x;
		if(ch == 'S'){
			mouth[0][x-1]=true;
		}
		else if(ch == 'H'){
			mouth[1][x-1]=true;
		}
		else if(ch == 'C'){
			mouth[2][x-1]=true;
		}
		else if(ch == 'D'){
			mouth[3][x-1]=true;
		}
		}
	}
	for(int i=0;i<=3;){
		for(int j=0;j<=12;){
	       if(mouth[i][j]==false){
			   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:44:2: error: expected '}' at end of input
   44 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main (){
      |            ^
Language: C++

#include<iostream>
using namespace std;
int main (){
	bool mouth[4][13];
	int n,x;
	char ch;
	for(int i=0;i<=4;i++){
		for(int j=0;j<=13;j++){
		cin>>n;
		for(int i=0;i<=n;i++){
			mouth[ch][x]=false;
			cin>>ch,x;
		if(ch == 'S'){
			mouth[0][x-1]=true;
		}
		else if(ch == 'H'){
			mouth[1][x-1]=true;
		}
		else if(ch == 'C'){
			mouth[2][x-1]=true;
		}
		else if(ch == 'D'){
			mouth[3][x-1]=true;
		}
		}
		}
	}
	for(int i=0;i<=3;){
		for(int j=0;j<=12;){
	       if(mouth[i][j]==false){
			   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:46:2: error: expected '}' at end of input
   46 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main (){
      |            ^
Language: C++

#include <stdio.h>

int main()

{
int a[4][13]={0};
int i, j, k, x, n;
char m;
scanf("%d", &n);

for(k = 0; k < n; k++)
{
scanf(" %c%d", &m, &x);
if(m == 'S')
a[0][x - 1] = 1;
else if(m == 'H')
a[1][x - 1] = 1;
else if(m == 'C')
a[2][x - 1] = 1;
else if(m == 'D')
a[3][x - 1] = 1;
{
printf("\n");
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:
a.cc: In function 'int main()':
a.cc:39:2: error: expected '}' at end of input
   39 | }
      |  ^
a.cc:12:1: note: to match this '{'
   12 | {
      | ^
a.cc:39:2: error: expected '}' at end of input
   39 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <stdio.h>

int main()

{
int a[4][13]={0};
int i, j, k, x, n;
char m;
scanf("%d", &n);

for(k = 0; k < n; k++)
{
scanf(" %c%d", &m, &x);
if(m == 'S')
a[0][x - 1] = 1;
else if(m == 'H')
a[1][x - 1] = 1;
else if(m == 'C')
a[2][x - 1] = 1;
else if(m == 'D')
a[3][x - 1] = 1;
{
printf("\n");
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:
a.cc: In function 'int main()':
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:22:1: note: to match this '{'
   22 | {
      | ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:12:1: note: to match this '{'
   12 | {
      | ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
using namespace std;
int main(){
    bool mouth[4][13];
    int n,x;
    char ch;
    for(int i=0;i<=4;i++){
        for(int j=0;j<=13;j++){
        cin>>n;
        for(int i=0;i<=n;i++){
            mouth[ch][x]=false;
            cin>>ch,x;
        if(ch == 'S'){
            mouth[0][x-1]=true;
        }
        else if(ch == 'H'){
            mouth[1][x-1]=true;
        }
        else if(ch == 'C'){
            mouth[2][x-1]=true;
        }
        else if(ch == 'D'){
            mouth[3][x-1]=true;
        }
        }
        }
    }
    for(int i=0;i<=3;){
        for(int j=0;j<=12;){
           if(mouth[i][j]==false){
               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:46:2: error: expected '}' at end of input
   46 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n,x;
	bool mouth[4][13];
    char ch;
    for(int i=0;i<4;i++){
        for(int j=0;j<13;j++){
        mouth[ch][x]=false;
		cin>>n;
        for(int i=0;i<=n;i++){
            cin>>ch,x;
        if(ch == 'S'){
            mouth[0][x-1]=true;
        }
        else if(ch == 'H'){
            mouth[1][x-1]=true;
        }
        else if(ch == 'C'){
            mouth[2][x-1]=true;
        }
        else if(ch == 'D'){
            mouth[3][x-1]=true;
        }
        }
        }
    }
    for(int i=0;i<=3;i++){
        for(int j=0;j<=12;j++){
           if(mouth[i][j]==false){
               if(i==0){
                   cout<<"S "<<j+1<<endl;
               }
               if (i==1){
                   cout<<"H "<<j+1<<endl;
               }
               if(i==2){
                   cout<<"C "<<j+1<<endl;
               }
               if(i==3){
                   cout<<"D "<<j+1<<endl;
               }
        }
    }
return 0;
}


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

#include<iostream>
using namespace std;
int main(){
    int n,x;
	bool mouth[4][13];
    char ch;
    for(int i=0;i<4;i++)
        for(int j=0;j<13;j++)
        mouth[ch][x]=false;
		cin>>n;
        for(int i=0;i<=n;i++){
            cin>>ch,x;
        if(ch == 'S'){
            mouth[0][x-1]=true;
        }
        else if(ch == 'H'){
            mouth[1][x-1]=true;
        }
        else if(ch == 'C'){
            mouth[2][x-1]=true;
        }
        else if(ch == 'D'){
            mouth[3][x-1]=true;
        }
     }
    for(int i=0;i<=3;i++){
        for(int j=0;j<=12;j++){
           if(mouth[i][j]==false){
               if(i==0){
                   cout<<"S "<<j+1<<endl;
               }
               if (i==1){
                   cout<<"H "<<j+1<<endl;
               }
               if(i==2){
                   cout<<"C "<<j+1<<endl;
               }
               if(i==3){
                   cout<<"D "<<j+1<<endl;
               }
        }
    }
return 0;
}


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

#include<iostream>
using namespace std;
int main(){
    int n,x;
	bool mouth[4][13];
    char ch;
    for(int i=0;i<4;i++)
        for(int j=0;j<13;j++)
        mouth[ch][x]=false;
		cin>>n;
        for(int i=0;i<n;i++){
            cin>>ch,x;
        if(ch == 'S'){
            mouth[0][x-1]=true;
        }
        else if(ch == 'H'){
            mouth[1][x-1]=true;
        }
        else if(ch == 'C'){
            mouth[2][x-1]=true;
        }
        else if(ch == 'D'){
            mouth[3][x-1]=true;
        }
     }
    for(int i=0;i<=3;i++){
        for(int j=0;j<=12;j++){
           if(mouth[i][j]==false){
               if(i==0){
                   cout<<"S "<<j+1<<endl;
               }
               if (i==1){
                   cout<<"H "<<j+1<<endl;
               }
               if(i==2){
                   cout<<"C "<<j+1<<endl;
               }
               if(i==3){
                   cout<<"D "<<j+1<<endl;
               }
        }
    }
return 0;
}


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

#include<iostream>
#include<string>
using namespace std;
int main(){
    int n,x;
	bool mouth[4][13];
    char ch;
    for(int i=0;i<4;i++)
        for(int j=0;j<13;j++)
        mouth[ch][x]=false;
		cin>>n;
        for(int i=0;i<n;i++){
            cin>>ch,x;
        if(ch == 'S'){
            mouth[0][x-1]=true;
        }
        else if(ch == 'H'){
            mouth[1][x-1]=true;
        }
        else if(ch == 'C'){
            mouth[2][x-1]=true;
        }
        else if(ch == 'D'){
            mouth[3][x-1]=true;
        }
     }
    for(int i=0;i<=3;i++){
        for(int j=0;j<=12;j++){
           if(mouth[i][j]==false){
               if(i==0){
                   cout<<"S "<<j+1<<endl;
               }
               if (i==1){
                   cout<<"H "<<j+1<<endl;
               }
               if(i==2){
                   cout<<"C "<<j+1<<endl;
               }
               if(i==3){
                   cout<<"D "<<j+1<<endl;
               }
        }
    }
return 0;
}


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

#include<iostream>
#include<string>
using namespace std;
int main(){
    int n,x;
	bool mouth[4][13];
    char ch;
    for(int i=0;i<4;i++)
        for(int j=0;j<13;j++)
        mouth[i][j]=false;
		cin>>n;
        for(int i=0;i<n;i++){
            cin>>ch,x;
        if(ch == 'S'){
            mouth[0][x-1]=true;
        }
        else if(ch == 'H'){
            mouth[1][x-1]=true;
        }
        else if(ch == 'C'){
            mouth[2][x-1]=true;
        }
        else if(ch == 'D'){
            mouth[3][x-1]=true;
        }
     }
    for(int i=0;i<=3;i++){
        for(int j=0;j<=12;j++){
           if(mouth[i][j]==false){
               if(i==0){
                   cout<<"S "<<j+1<<endl;
               }
               if (i==1){
                   cout<<"H "<<j+1<<endl;
               }
               if(i==2){
                   cout<<"C "<<j+1<<endl;
               }
               if(i==3){
                   cout<<"D "<<j+1<<endl;
               }
        }
    }
return 0;
}


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

#include<iostream>
#include<string>
using namespace std;
int main(){
    int n,x;
	bool mouth[4][13];
    char ch;
    for(int i=0;i<4;i++)
        for(int j=0;j<13;j++)
        mouth[i][j]=false;
		cin>>n;
        for(int i=0;i<n;i++){
            cin>>ch,x;
        if(ch == 'S')
            mouth[0][x-1]=true;
        if(ch == 'H')
            mouth[1][x-1]=true;        
        if(ch == 'C')
            mouth[2][x-1]=true;
        if(ch == 'D')
            mouth[3][x-1]=true;
     }
    for(int i=0;i<4;i++){
        for(int j=0;j<13;j++){
           if(mouth[i][j]==false){
               if(i==0){
                   cout<<"S "<<j+1<<endl;
               }
               if (i==1){
                   cout<<"H "<<j+1<<endl;
               }
               if(i==2){
                   cout<<"C "<<j+1<<endl;
               }
               if(i==3){
                   cout<<"D "<<j+1<<endl;
               }
        }
    }
return 0;
}


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

#include<iostream>
#include<string>
using namespace std;
int main(){
    int n,x;
	bool mouth[4][13];
    char ch;
    for(int i=0;i<4;i++)
        for(int j=0;j<13;j++)
        mouth[i][j]=false;
		cin>>n;
        for(int i=0;i<n;i++){
            cin>>ch,x;
        if(ch == 'S')
            mouth[0][x-1]=true;
        if(ch == 'H')
            mouth[1][x-1]=true;        
        if(ch == 'C')
            mouth[2][x-1]=true;
        if(ch == 'D')
            mouth[3][x-1]=true;
     }
    for(int i=0;i<4;i++){
        for(int j=0;j<13;j++){
           if(mouth[i][j]==false){
               if(i==0)
                   cout<<"S "<<j+1<<endl;
               
               if (i==1)
                   cout<<"H "<<j+1<<endl;
               
               if(i==2)
                   cout<<"C "<<j+1<<endl;
               
               if(i==3)
                   cout<<"D "<<j+1<<endl;
               
        }
    }
return 0;
}


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

#include<iostream>
#include<string>
using namespace std;
int main (){
   int n,x;
    bool mouth[4][13];
   char ch;
   for(int i=0;i<4;i++)
       for(int j=0;j<13;j++)
       mouth[i][j]=false;
        cin>>n;
       for(int i=0;i<n;i++){
           cin>>ch,x;
       if(ch == 'S')
           mouth[0][x-1]=true;
       if(ch == 'H')
           mouth[1][x-1]=true;        
       if(ch == 'C')
           mouth[2][x-1]=true;
       if(ch == 'D')
           mouth[3][x-1]=true;
    }
   for(int i=0;i<4;i++){
       for(int j=0;j<13;j++){
          if(mouth[i][j]==false){
              if(i==0)
                  cout<<"S "<<j+1<<endl;
             
              if (i==1)
                  cout<<"H "<<j+1<<endl;
             
              if(i==2)
                  cout<<"C "<<j+1<<endl;
             
              if(i==3)
                  cout<<"D "<<j+1<<endl;
             
       }
   }
return 0;
}


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

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    char ch,card[4][13]={false};
    int n,a,i;
    cin>>n;
    faor(i=0;i<=n-1;i++){
        cin>>ch>>a;
        if(ch=='S'){
            card[0][a-1]=true;
        }if(ch=='H'){
            card[1][a-1]=true;
        }if(ch=='C'){
            card[2][a-1]=true;
        }if(ch=='D'){
            card[3][a-1]=true;
        }
       
    }
 for(int i=0; i<4; i++){
            for(int j=0; j<13;j++){
				if(card[i][j]==false){
				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:8:13: error: expected ')' before ';' token
    8 |     faor(i=0;i<=n-1;i++){
      |         ~   ^
      |             )
a.cc:8:24: error: expected ';' before ')' token
    8 |     faor(i=0;i<=n-1;i++){
      |                        ^
      |                        ;
Language: C++

#include <stdio.h>
int main(void){
  

 int W, H, x, y, r;
 cin >> W >> H >> x >> y >> r;
 if(r <= x && r <= y && x + r <= W && y + r <= H) puts("Yes"); 
 else puts("No"); 
    
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:2: error: 'cin' was not declared in this scope
    6 |  cin >> W >> H >> x >> y >> r;
      |  ^~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:19:33: error: expected primary-expression before '==' token
   19 |             if(card[mark[j]][i])==0){
      |                                 ^~
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
#include<stdio.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    int i = 0;
    int cards[4][13];
    int j,k,,l,m;
    for(j = 0; j<4; j++){
        for(k = 0; k <13; k++){
            cards[j][k] = 0;
        }
    }
    for(i = 0;i<n;i++){
        char mark;
        int number;
        cin >> mark >> number;
        if (mark == "S"){
            cards[0][number] = 1;
        } else if (mark == "H"){
            cards[1][number] = 1;
        } else if (mark == "C"){
            cards[2][number] = 1;
        } else{
            cards[3][number] = 1;
        }
    }
    for(l = 0; l<4; l++){
        for(m = 0; m <13; m++){
            if (cards[l][m] == 0){
                if (l == 0) {
                    cout << "S" << " " << m + 1 << endl;
                } else if (l == 1) {
                    cout << "H" << " " << m + 1 << endl;
                } else if (l == 2) {
                    cout << "C" << " " << m + 1 << endl;
                } else if (l == 3) {
                    cout << "D" << " " << m + 1 << endl;
                }
            }
        }
    }
    return 0;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: expected unqualified-id before ',' token
   26 |     int j,k,,l,m;
      |             ^
a.cc:36:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   36 |         if (mark == "S"){
      |             ~~~~~^~~~~~
a.cc:38:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   38 |         } else if (mark == "H"){
      |                    ~~~~~^~~~~~
a.cc:40:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   40 |         } else if (mark == "C"){
      |                    ~~~~~^~~~~~
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
#include<stdio.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    int i = 0;
    int cards[4][13];
    int j,k,,l,m;
    for(j = 0; j<4; j++){
        for(k = 0; k <13; k++){
            cards[j][k] = 0;
        }
    }
    for(i = 0;i<n;i++){
        string mark;
        int number;
        cin >> mark >> number;
        if (mark == "S"){
            cards[0][number] = 1;
        } else if (mark == "H"){
            cards[1][number] = 1;
        } else if (mark == "C"){
            cards[2][number] = 1;
        } else{
            cards[3][number] = 1;
        }
    }
    for(l = 0; l<4; l++){
        for(m = 0; m <13; m++){
            if (cards[l][m] == 0){
                if (l == 0) {
                    cout << "S" << " " << m + 1 << endl;
                } else if (l == 1) {
                    cout << "H" << " " << m + 1 << endl;
                } else if (l == 2) {
                    cout << "C" << " " << m + 1 << endl;
                } else if (l == 3) {
                    cout << "D" << " " << m + 1 << endl;
                }
            }
        }
    }
    return 0;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: expected unqualified-id before ',' token
   26 |     int j,k,,l,m;
      |             ^
Language: C++

#include <iostream>
using namespace std;
char X,Y,Z;
int anko;

int main(){
  int A=0;
  bool C[4][13];
  cin >> A;
  for(int i=0;i<A;i++){
    cin >> X >> anko;
    if(X=='S'){
      C[0][anko]=1;
    }
    if(X=='H'){
      C[1][anko]=1;
    }
    if(X=='C'){
      C[2][anko]=1;
    }
    if(X=='D'){
      C[3][anko]=1;
    }
  }
  for(int L=0;L<4;L++){
    for(int K=0;K<13;K++){
      if(C[L][K]!=1){
        if(L==0){
          if(K!=0){
          cout << "S " << K << endl;
          }
        }
        if(L==1){
          if(K!=0){
          cout << "H " << K << endl;
          } 
        }
        if(L==2){
          if(K!=0){
          cout << "C " << K << endl;
          } 
        }
        if(L==3){
          if(K!=0){
          cout << "D " << K << endl;
          } 
        }
      }


Compiler output:
a.cc: In function 'int main()':
a.cc:48:8: error: expected '}' at end of input
   48 |       }
      |        ^
a.cc:26:26: note: to match this '{'
   26 |     for(int K=0;K<13;K++){
      |                          ^
a.cc:48:8: error: expected '}' at end of input
   48 |       }
      |        ^
a.cc:25:23: note: to match this '{'
   25 |   for(int L=0;L<4;L++){
      |                       ^
a.cc:48:8: error: expected '}' at end of input
   48 |       }
      |        ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

47
S 10
S 11
S 12
S 13
H 1
H 2
S 6
S 7
S 8
S 9
H 6
H 8
H 9
H 10
H 11
H 4
H 5
S 2
S 3
S 4
S 5
H 12
H 13
C 1
C 2
D 1
D 2
D 3
D 4
D 5
D 6
D 7
C 3
C 4
C 5
C 6
C 7
C 8
C 9
C 10
C 11
C 13
D 9
D 10
D 11
D 12
D 13


Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 47
      | ^~
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++){
    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: In function 'int main()':
a.cc:12:12: error: expected ';' before '-' token
   12 |   for(int i - 0;i<n; i++){
      |            ^~
      |            ;
a.cc:12:20: error: expected ')' before ';' token
   12 |   for(int i - 0;i<n; i++){
      |      ~             ^
      |                    )
a.cc:12:22: error: 'i' was not declared in this scope
   12 |   for(int i - 0;i<n; i++){
      |                      ^
a.cc:18:12: error: expected ';' before '-' token
   18 |   for(int s - 0; s<4; s++){
      |            ^~
      |            ;
a.cc:18:21: error: expected ')' before ';' token
   18 |   for(int s - 0; s<4; s++){
      |      ~              ^
      |                     )
a.cc:18:23: error: 's' was not declared in this scope
   18 |   for(int s - 0; s<4; s++){
      |                       ^
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: In function 'int main()':
a.cc:19:12: error: expected ';' before '-' token
   19 |   for(int s - 0; s<4; s++){
      |            ^~
      |            ;
a.cc:19:21: error: expected ')' before ';' token
   19 |   for(int s - 0; s<4; s++){
      |      ~              ^
      |                     )
a.cc:19:23: error: 's' was not declared in this scope
   19 |   for(int s - 0; s<4; s++){
      |                       ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
    int cards[4][13];
    char kind;
    int number;
    int n;
    int i, j;
    char kinds[4] = {"S", "H", "C", "D"};
    cin >> n;

    for (i = 0; i < 4; i++)
    {
        for (j = 1; j < 14; j++)
        {

            cards[i][j] = false;
        }
    }

    for (i = 0; i < n; i++)
    {
        cin >> kind >> number;
        if (kind == 'S')
        {
            cards[0][number - 1] = true;
        }
        if (kind == 'H')
        {
            cards[1][number - 1] = true;
        }
        if (kind == 'C')
        {
            cards[2][number - 1] = true;
        }
        if (kind == 'D')
        {
            cards[3][number - 1] = true;
        }
    }


    for (i = 0; i < 4; i++)
    {
        for (j = 1; j < 14; j++)
        {

            if (cards[i][j - 1] != true)
            {
                cout << kinds[i] << ' ' << j << endl;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:40: error: too many initializers for 'char [4]'
   11 |     char kinds[4] = {"S", "H", "C", "D"};
      |                                        ^
Language: C++

#include <stdio.h> using namespace std; void outPut(int Array[],char mark){ for(int i = 1; i <= 13; i++){ if(Array[i] == 0) printf("%c %d\n",mark,i); } } int main(){ char mark[2]; int n,S[14],H[14],C[14],D[14],tmp; for(int i = 0; i < 14; i++) S[i] = H[i] = C[i] = D[i] = 0; scanf("%d",&n); for(int i = 0; i < n; i++){ scanf("%s %d",mark,&tmp); switch(mark[0]){ case 'S': S[tmp] = 1; break; case 'H': H[tmp] = 1; break; case 'C': C[tmp] = 1; break; case 'D': D[tmp] = 1; break; } } outPut(S,'S'); outPut(H,'H'); outPut(C,'C'); outPut(D,'D'); } 



 



Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> using namespace std; void outPut(int Array[],char mark){ for(int i = 1; i <= 13; i++){ if(Array[i] == 0) printf("%c %d\n",mark,i); } } int main(){ char mark[2]; int n,S[14],H[14],C[14],D[14],tmp; for(int i = 0; i < 14; i++) S[i] = H[i] = C[i] = D[i] = 0; scanf("%d",&n); for(int i = 0; i < n; i++){ scanf("%s %d",mark,&tmp); switch(mark[0]){ case 'S': S[tmp] = 1; break; case 'H': H[tmp] = 1; break; case 'C': C[tmp] = 1; break; case 'D': D[tmp] = 1; break; } } outPut(S,'S'); outPut(H,'H'); outPut(C,'C'); outPut(D,'D'); }
      |                    ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
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=0;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:12:5: error: 'cin' does not name a type
   12 |     cin>>n;
      |     ^~~
a.cc:13:5: error: expected unqualified-id before 'for'
   13 |     for(int i=0;i<n;i++){
      |     ^~~
a.cc:13:17: error: 'i' does not name a type
   13 |     for(int i=0;i<n;i++){
      |                 ^
a.cc:13:21: error: 'i' does not name a type
   13 |     for(int i=0;i<n;i++){
      |                     ^
a.cc:20:5: error: expected unqualified-id before 'for'
   20 |     for(int s=0;s<4;s++){
      |     ^~~
a.cc:20:17: error: 's' does not name a type
   20 |     for(int s=0;s<4;s++){
      |                 ^
a.cc:20:21: error: 's' does not name a type
   20 |     for(int s=0;s<4;s++){
      |                     ^
a.cc:30:5: error: expected unqualified-id before 'return'
   30 |     return 0;
      |     ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^