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

#include<stdio.h>
#include<string.h>
int main(void){
 char s[100],t[100],tmp1[100],tmp2[100];
 int N,M,i,j,r,count=0;
 scanf("%s",s);
 scanf("%s",t);
 for(i=0;s[i]!='\0';i++){
  N++;
 }
 for(i=0;t[i]!='\0';i++){
  M++;
 }
 for(i=0;i<N;i++){
  for(j=i+1;j<N;j++){
   if(strcmp(&s[i],&s[j])>0){
    strcpy(&s[i],&s[j]);
    }
  }
 }
 for(i=0;i<M;i++){
  for(j=i+1;j<M;j++){
   if(strcmp(&t[i],&t[j])>0){
    strcpy(&t[i],&t[j]);
    }
  }
 }
 if(N<M){ 
 for(i=0;i<N;i++){
 if(strcmp(&s[i],&t[i])!=0) count++;
 }
 if(count==0) {
printf("Yes");
 return 0;
}
}
 count=0;
 for(i=0;strcmp(&s[i],&t[i])==0;i++){
 count++;
 }
if(strcmp(&s[count+1],&t[count+1])<0){
 printf("Yes");
 return 0;
} else {
 printf("No");
 return 0;
} 

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

#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<cstring>
int main()
{
using namespace std;	
int i,x,y,z,j;
char a[100],b[100];
gets(a);
gets(b);

string str=a;
string str2=b;
if(str>str2)
{
	printf("No\n");
}
else
	printf("Yse\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:1: error: 'gets' was not declared in this scope; did you mean 'getw'?
   11 | gets(a);
      | ^~~~
      | getw
Language: C++

#include<cstdio>

int main(){
	char temp;
	int n,m,max;
	int i,j;
	int flag;
char a[1000];
char b[1000];
    gets(a);
    gets(b);
    for(i=0;a[i]!='\0';i++);
       n=i;
    for(i=0;i<n-1;i++){
    	for(j=i+1;j<n;j++){
    	if(a[i]>a[j]){
    		temp=a[j];
    		a[j]=a[i];
    		a[i]=temp;
			}
		}
	}
	 for(i=0;b[i]!='\0';i++);
       m=i;
    for(i=0;i<m-1;i++){
    	for(j=i+1;j<m;j++){
    	if(b[i]<b[j]){
    		temp=b[j];
    		b[j]=b[i];
    		b[i]=temp;
			}
		}
	}

	flag=0;
   	if(m>=n){
	    	for(i=0;b[i]!='\0';i++){
		  if(a[i]<b[i]){
		  	  printf("YES\n");
		  	  flag=1;
		  	break;
		  }
		  if(a[i]==b[i]) continue;
		  if(a[i]>b[i]){
		  	  flag=0;
		  	  break;
		  }
		}
		  if(flag==0)
		  	 printf("NO\n");
    }


	else {
		for(i=0;a[i]!='\0';i++){
		  if(a[i]<b[i]){
		  	  printf("YES\n");
		  	  flag=1;
		  	  break;
		  }	
		  if(a[i]==b[i]) continue;
		  if(a[i]>b[i]){
		  	  flag=0;
		  	  break;
	    	}
		}
	   	  if(flag==0)  printf("NO\n");
	}

	}




    		





Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |     gets(a);
      |     ^~~~
      |     getw
Language: C

#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<cstring>
int main()
{
int i,x,y,z,j;
char a[100],b[100];
gets(a);
gets(b);

for(j=0,i=0;j<100;i++,j++)
	{
	  if(a[i]>=b[j])
	  {
	  	 printf("No\n");
        break;
	  }
	  else 
	  	  printf("Yes\n");
	  	  break;
	}
}


Compiler output:
main.c:1:9: fatal error: cstdio: No such file or directory
    1 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std ;
#define loop(i,a,b)  for(int i=a;i<b;i++)
int main()
{   string s,t;cin>>s>>t;
      sort(s.begin(),s.end());
      sort(t.rbegin(),t.rend()) ;
      for( i=0;s[i]&&t[i];i++) {
      if(int(s[i])<int(t[i])){cout<<"Yes"<<endl;exit(0);}
	  else if (int(s[i])>int(t[i])){cout<<"No"<<endl;exit(0);}}
	  if(int(s[i])) {cout<<"No"<<endl;exit(0);}
	  else if(int(t[i])){cout<<"Yes"<<endl;exit(0);}
	  else cout<<"No"<<endl;
      
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'i' was not declared in this scope
    8 |       for( i=0;s[i]&&t[i];i++) {
      |            ^
a.cc:11:20: error: 'i' was not declared in this scope
   11 |           if(int(s[i])) {cout<<"No"<<endl;exit(0);}
      |                    ^
Language: C

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

size_t str_length(const char *s)
{
    size_t len = 0;
    while(*s++)
        len++;
    return((int)len);
}
void swap(char *x,char *y)
{
    char temp=*x;
    *x=*y;
    *y=temp;
}
void sort(char *t,int n)
{
    int k=n-1;
    while(k>=0)
    {
        int i,j;
        for(i=1,j=-1;i<=k;i++)
        {
            if(*(t+i-1)>*(t+i))
            {
                j=i-1;
                swap(t+i,t+j);
            }
        }
        k=j;
    }
}
int main(void)
{
    
    
    char st[100];
    char ss[100];
    
    scanf("%s",st);
    sort(st,str_length(st));
    scanf("%s",ss);
    sort(st,str_length(ss));
    if(ststrcmp(st, ss) == 0) {
        printf("No");
    }else{
         printf("Yes");
    }
    
   
    return(0);
}









Compiler output:
main.c: In function 'main':
main.c:45:8: error: implicit declaration of function 'ststrcmp'; did you mean 'strcmp'? [-Wimplicit-function-declaration]
   45 |     if(ststrcmp(st, ss) == 0) {
      |        ^~~~~~~~
      |        strcmp
Language: C++


#include <math.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>

int main()
{
	std::string s, t;
	std::getline(std::cin, s);
	std::getline(std::cin, t);

	for (int i = 0; i < s.length() - 1; i++)
	{
		for (int j = s.length - 1; j > i; j++)
		{
			if (s[j - 1] > s[j])
			{
				char temp = s[j - 1];
				s[j - 1] = s[j];
				s[j] = temp;
			}
		}
	}

	for (int i = 0; i < t.length() - 1; i++)
	{
		for (int j = t.length - 1; j > i; j++)
		{
			if (t[j - 1] < t[j])
			{
				char temp = t[j - 1];
				t[j - 1] = t[j];
				t[j] = temp;
			}
		}
	}

	for (int i = 0; i < std::min(s.length(), t.length()); i++)
	{
		if (s[i] < t[i])
		{
			std::cout << "Yes";
			return 0;
		}
		else if (s[i] > t[i])
		{
			std::cout << "No";
			return 0;
		}
	}

	//still alive
	if (s.length() < t.length())
	{
		std::cout << "Yes";
	}
	else std::cout << "No";

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:32: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   16 |                 for (int j = s.length - 1; j > i; j++)
      |                              ~~^~~~~~
      |                                      ()
a.cc:29:32: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   29 |                 for (int j = t.length - 1; j > i; j++)
      |                              ~~^~~~~~
      |                                      ()
Language: C

#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<cstring>
int main()
{
int i,x,y,z,j,n;
char a[100],b[100];

gets(a); 
gets(b);



for(j=0,i=0;j<100;i++,j++)
	{
	  if(a[i]>=b[j])
	  {
	  	 printf("No\n");
	  	 break;
	  }
	  else 
	  	  printf("Yes\n");
	  	  break;
	}
}


Compiler output:
main.c:1:9: fatal error: cstdio: No such file or directory
    1 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#include<cstdio>
#include<iostream>
#include<cmath>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
	char a[150],b[150];
	int i,j,k=0,c=0,d=0,s=1,e=0;
	gets(a);
	gets(b);
	c=strlen(a);
	d=strlen(b);
	for(i=0;i<c;i++){
		for(j=i;j<c-1;j++){
			if(a[i]>a[j]){
					k=a[i];
					a[i]=a[j];
					a[j]=a[i];
				}
			}
		}
		for(i=1;i<d-1;i++){
			for(j=i;j<d-1;j++){
				if(b[i]>b[j]){
					k=b[i];
					b[i]=b[j];
					b[j]=b[i];
				}
			}
		}
		if(a[0]!=b[0]) s=0;
		for(i=0;i<c;i++){
			if(a[0]!=b[i]){
				e++;
			}
			else break;
		}
		if(c>d-e) {printf("NO\n");return 0;}
		if( e==c-1 && s==0 ) {printf("NO\n");return 0;}
		for(i=0;i<c;i++){
			if(a[i]!=b[i+e]) {printf("NO\n");return 0;}
		}
		printf("YES\n");
		return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

#include<cstdio>
#include<iostream>
#include<cmath>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
	char a[150],b[150];
	int i,j,k=0,c=0,d=0,s=1,e=0;
	gets(a);
	gets(b);
	c=strlen(a);
	d=strlen(b);
	for(i=0;i<c-1;i++){
			for(j=i;j<c-1;j++){
				if(a[i]>a[j]){
					k=a[i];
					a[i]=a[j];
					a[j]=a[i];
				}
			}
		}
		for(i=1;i<d-1;i++){
			for(j=i;j<d-1;j++){
				if(b[i]>b[j]){
					k=b[i];
					b[i]=b[j];
					b[j]=b[i];
				}
			}
		}
		if(a[0]!=b[0]) s=0;
		for(i=0;i<c;i++){
			if(a[0]!=b[i]){
				e++;
			}
			else break;
		}
		if(c>d-e) {printf("NO\n");return 1;}
		if( e==c-1 && s==0 ) {printf("NO\n");return 0;}
		for(i=0;i<c;i++){
			if(a[i]!=b[i+e]) {printf("NO\n");return 0;}
		}
		printf("YES\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

#include <iostream>
using namespace std;

int main(){
    char a[105],b[105];
    cin >> a >> b;
    int l1,l2;
    l1 =strlen(a);
    l2 = strlen(b);
    int res =0;
    
    for(int i=1;i<=l1;i++){
        int jud=0;            //1 セーフ　0　アウト
        for(int k=1;k<=l2;k++){
            if(a[i]==b[k]){
                a[i] = 'A';
                b[k] = 'A';
                jud =1;
                break;
            }
            if(jud ==0||k==l2){
                res =0;
            }
        }
        if(i==l1){res = 1;}
    }
    
    if(res ==1){
        cout << "Yes" <<endl;
    }else{
        cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'strlen' was not declared in this scope
    8 |     l1 =strlen(a);
      |         ^~~~~~
a.cc:2:1: note: 'strlen' 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<cstdlib>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
	char a[101], b[101];
	gets(a);
	gets(b);
	char min;
	for(int i = 0; a[i] != '\0'; i++)
	{
		min = a[i];
		for(int j = i + 1; a[j] != '\0'; j++)
		{
			if(a[j] < min)
			{
				min = a[j];
				a[j] = a[i];
				a[i] = min;
			}
		}
	}
	char max;
	for(int k = 0; b[k] != '\0'; k++)
	{
		max = b[k];
		for(int l = k + 1; b[l] != '\0'; l++)
		{
			if(b[l] > max)
			{
				max = b[l];
				b[l] = b[k];
				b[k] = max;
			}
		}
	}
	if(strcmp(a, b) < 0)
	{
		printf("Yes\n");
	}
	else
	{
		printf("No\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <functional>

using namespace std;
string s, t;
const int MAX_S = 100;
char s1[MAX_S], t1[MAX_S];

int main() {

	cin >> s >> t;

	for (int i = 0; i < s.length(); i++) {
		s1[i] = s[i];
	}
	for (int i = 0; i < t.length(); i++) {
		t1[i] = t[i];
	}

	sort(s1, s1 + s.length());
	sort(t1, t1 + t.length(), greater<char>());

	if (strcmp(s1, t1) < 0) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: 'strcmp' was not declared in this scope
   25 |         if (strcmp(s1, t1) < 0) {
      |             ^~~~~~
a.cc:5:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <functional>
  +++ |+#include <cstring>
    5 |
Language: C++

#include<cstdio>
#include<iostream>
#include<cmath>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
	char a[150],b[150];
	int i,j,k=0,c,d=0,s=1,e=0;
	gets(a);
	gets(b);
	c=strlen(a);
	d=strlen(b);
	for(i=0;i<c-1;i++){
			for(j=i;j<c-1;j++){
				if(a[i]>a[j]){
					k=a[i];
					a[i]=a[j];
					a[j]=a[i];
				}
			}
		}
		for(i=1;i<c;i++){
			for(j=i;j<c;c++){
				if(b[i]>b[j]){
					k=b[i];
					b[i]=b[j];
					b[j]=b[i];
				}
			}
		}
		if(a[0]!=b[0]) s=0;
		for(i=0;i<c;i++){
			if(a[0]!=b[i]){
				e++;
			}
			else break;
		}
		if( e==c-1 && s==0 ) {printf("NO\n");return 1;}
		for(i=0;i<c;i++){
			if(a[i]!=b[i+e]) {printf("NO\n");return 1;}
		}
		printf("YES\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

#include<cstdio>
#include<iostream>
#include<cmath>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
	char a[150],b[150];
	int i,j,k=0,c,d=0,s=1,e=0;
	gets(a);
	gets(b);
	c=strlen(a);
	d=strlen(b);
	if(c>=d) {printf("NO\n");return 1;}
	else{
		for(i=0;i<c-1;i++){
			for(j=i;j<c-1;j++){
				if(a[i]>a[j]){
					k=a[i];
					a[i]=a[j];
					a[j]=a[i];
				}
			}
		}
		for(i=1;i<c;i++){
			for(j=i;j<c;c++){
				if(b[i]>b[j]){
					k=b[i];
					b[i]=b[j];
					b[j]=b[i];
				}
			}
		}
		if(a[0]!=b[0]) s=0;
		for(i=0;i<c;i++){
			if(a[0]!=b[i]){
				e++;
			}
			else break;
		}
		if( e==c-1 && s==0 ) {printf("NO\n");return 1;}
		for(i=0;i<c;i++){
			if(a[i]!=b[i+e]) {printf("NO\n");return 1;}
		}
		printf("YES\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

#include<cstdlib>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
	char a[105], b[105];
	gets(a);
	gets(b);
	char min;
	for(int i = 0; a[i] != '\0'; i++)
	{
		min = a[i];
		for(int j = i + 1; a[j] != '\0'; j++)
		{
			if(a[j] < min)
			{
				min = a[j];
				a[j] = a[i];
				a[i] = min;
			}
		}
	}
	char max;
	for(int k = 0; b[k] != '\0'; k++)
	{
		max = b[k];
		for(int l = k + 1; b[l] != '\0'; l++)
		{
			if(b[l] > max)
			{
				max = b[l];
				b[l] = b[k];
				b[k] = max;
			}
		}
	}
	if(strcmp(a, b) < 0)
	{
		printf("Yes\n");
	}
	else
	{
		printf("No\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

#include<cstdlib>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
	char a[105], b[105];
	gets(a);
	gets(b);
	char min;
	for(int i = 0; a[i] != '\0'; i++)
	{
		min = a[i];
		for(int j = i + 1; a[j] != '\0'; j++)
		{
			if(a[j] < min)
			{
				min = a[j];
				a[j] = a[i];
				a[i] = min;
			}
		}
	}
	char max;
	for(int k = 0; b[k] != '\0'; k++)
	{
		max = b[k];
		for(int l = k + 1; b[l] != '\0'; l++)
		{
			if(b[l] > max)
			{
				max = b[l];
				b[l] = b[k];
				b[k] = max;
			}
		}
	}
	if(strcmp(a, b) < 0)
	{
		printf("Yes\n");
	}
	else
	{
		printf("NO\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

int main(){
  string s, t;
  cin >> s >> t;
  
  for( int i=0; i<s.length() - 1; i++){
    for(int j= i+1; j<s.length(); j++){
      if(s[i] > s[j]){
        char t = s[i];
        s[i] = s[j];
        s[j] = t;
      }
    }
  }
  for( int i=0; i<t.length() - 1; i++){
    for(int j= i+1; j<t.length(); j++){
      if(t[i] > t[j]){
        char c = t[i];
        t[i] = t[j];
        t[j] = c;
      }
    }
  }
  
  if(strcmp(s,t) == -1)
    cout << "Yes";
  else
    cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
    2 |   string s, t;
      |   ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> s >> t;
      |   ^~~
a.cc:3:10: error: 's' was not declared in this scope
    3 |   cin >> s >> t;
      |          ^
a.cc:3:15: error: 't' was not declared in this scope
    3 |   cin >> s >> t;
      |               ^
a.cc:24:6: error: 'strcmp' was not declared in this scope
   24 |   if(strcmp(s,t) == -1)
      |      ^~~~~~
a.cc:1:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | int main(){
a.cc:25:5: error: 'cout' was not declared in this scope
   25 |     cout << "Yes";
      |     ^~~~
a.cc:27:5: error: 'cout' was not declared in this scope
   27 |     cout << "No";
      |     ^~~~
Language: C++

{
	char a[105];
	char b[105];
	int i, len1 , len2;
	while(scanf("%s", a)!=EOF)
	{
		int min1 =1000, max2 = 0;
		scanf("%s",b);
		len1 = strlen(a);
		len2 = strlen(b);
		for(i = 0 ; i < len1 ; i++)
		{
			if(min1 > a[i])
			{
				min1 = a[i];
			}
		}
		for(i = 0 ; i < len2 ; i++)
		{
			if(max2 < b[i])
			{
				max2 = b[i];
			}
		}
		if(max2 > min1)
		{
			printf("Yes\n");
		}
		if(max2 = min1 && len2 < len1)
		{
			printf("No\n");
		}
		if(max2 = min1 && len2 == len1 )
		{
			printf("No\n");
		}
		if(max2 = min1 && len2 > len1)
		{
			printf("Yes\n");
		}
		if(max2 < min1)
		{
			printf("No\n");
		}
	}
	return 0;
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before '{' token
    1 | {
      | ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cstdio>
using namespace std;

int main(void)
{
	string s, t;
	cin >> s >> t;

	char *sc = new char[s.length() + 1];
	char *tc = new char[t.length() + 1];

	for (int i = 0; i < s.length(); ++i) {
		sc[i] = s[i];
	}
	sc[s.length()] = '\0';
	for (int i = 0; i < t.length(); ++i) {
		tc[i] = t[i];
	}
	tc[t.length()] = '\0';

	sort(sc, sc + s.length());
	sort(tc, tc + t.length(), greater<char>());

	if (strcmp(sc, tc) < 0) {
		cout << "Yes" << endl;
	} else {
		cout << "No" << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: 'strcmp' was not declared in this scope
   28 |         if (strcmp(sc, tc) < 0) {
      |             ^~~~~~
a.cc:6:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <cstdio>
  +++ |+#include <cstring>
    6 | using namespace std;
Language: C++

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

int main(void)
{
	string s, t;
	cin >> s >> t;

	char *sc = new char[s.length() + 1];
	char *tc = new char[t.length() + 1];

	for (int i = 0; i < s.length(); ++i) {
		sc[i] = s[i];
	}
	sc[s.length()] = '\0';
	for (int i = 0; i < t.length(); ++i) {
		tc[i] = t[i];
	}
	tc[t.length()] = '\0';

	sort(sc, sc + s.length());
	sort(tc, tc + t.length(), greater<char>());

	if (strcmp(sc, tc) < 0) {
		cout << "Yes" << endl;
	} else {
		cout << "No" << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:13: error: 'strcmp' was not declared in this scope
   27 |         if (strcmp(sc, tc) < 0) {
      |             ^~~~~~
a.cc:5:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <functional>
  +++ |+#include <cstring>
    5 | using namespace std;
Language: C++

//競技プログラミング　テンプレ
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

#define REP(i,n) for(int i = 0; i < (int)(n); ++i)

const int max_v = 300;
const int INF = 1000000;



int main() {
	int a,b,n=0;
  int ans;
	string x,y;

  cin >> x >> y; 
  sort(x.begin(),x.end());
  sort(y.begin(),y.end(),greate<char*>());
  if(x < y ){ cout << "Yes" << endl; return 0;}
  else {cout << "No" << endl; return 0;}
  //else if(x ==y){ if()return 0;}
  

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:26: error: 'greate' was not declared in this scope
   24 |   sort(y.begin(),y.end(),greate<char*>());
      |                          ^~~~~~
a.cc:24:33: error: expected primary-expression before 'char'
   24 |   sort(y.begin(),y.end(),greate<char*>());
      |                                 ^~~~
Language: C++

#include<iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;
typedef unsigned long ul;
typedef pair<ul, ul> P;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

int main(){
  char s[100],t[100];
  cin >> s >> t;

  sort(s,s+strlen(s));
  sort(t,t + strlen(t), greater<char>());

  if (strcmp(s,t)<0) cout << "Yes" << endl;
  else cout << "No" << endl;


  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: 'strlen' was not declared in this scope
   18 |   sort(s,s+strlen(s));
      |            ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <algorithm>
  +++ |+#include <cstring>
    6 | 
a.cc:21:7: error: 'strcmp' was not declared in this scope
   21 |   if (strcmp(s,t)<0) cout << "Yes" << endl;
      |       ^~~~~~
a.cc:21:7: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <iostream>
#include <algorithm>

int main()
{
    char s[128];
    char t[128];
    std::cin >> s >> t;
    std::sort(s, s + strlen(s));
    std::sort(t, t + strlen(t), [](char a, char b) { return a > b; });
    
    std::cout << (strcmp(s, t) < 0 ? "yes" : "no") << std::endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'strlen' was not declared in this scope
    9 |     std::sort(s, s + strlen(s));
      |                      ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <algorithm>
  +++ |+#include <cstring>
    3 | 
a.cc:12:19: error: 'strcmp' was not declared in this scope
   12 |     std::cout << (strcmp(s, t) < 0 ? "yes" : "no") << std::endl;
      |                   ^~~~~~
a.cc:12:19: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<map>
#include<cstdlib>
#include<stack>
#include<queue>
#include<algorithm>
#include<set>
#include<vector>
#include<cmath>
#include<string>
#include<deque>
#define lmid l,mid,rt<<1
#define rmid mid+1,r,rt<<1|1
using namespace std;
char s[105],t[105];
int main()
{
     scanf("%s",s);
     scanf("%s",t);
     int n=strlen(s),m=strlen(t);
     sort(s,s+n);
     sort(t,t+m);
     bool flag=false;
     int i=0,j=m-1;
     while(i<n||j>=0)
     {
          if(s[i] < t[j]) {
               flag = true;
               break;
          
          if(s[i]>t[j])
          {
               break;
          }
          i++,j--;
          if(i>=n&&j>=0)
          {
               flag=true;
               break;
          }
          if(i<n&&j<0)
          {
               break;
          }
     }
     if(flag) printf("Yes\n");
     else printf("No\n");
}


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

#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>
#include <cstdio>
#include <string>
#include <fstream>
#include <queue>
#include <cmath>
using namespace std;
//ABC082.c

int main(void) {
	string N,t;
	cin >> N;
	cin >> t;
	sort(N.begin(), N.end());
	sort(t.rbegin(), t.rend());

	if (N < t)puts("YES");
	if (N >= t)puts("NO");

	/* //C
	vector<int>b(N+1,0);
	int change = 0;
	
	for (int i = 1; i < N+1; i++) {
		cin >> t;
		if (t > N)change++;
		else b[t]++;
	}
	for (int i = 1; i < N+1; i++) {
		if (b[i] != i &&b[i]!=0) {
			if(b[i]>i)
			change +=abs( b[i] - i);
			else change += b[i];
		}
	}
	printf("%d", change);
	*/
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   16 |         sort(N.begin(), N.end());
      |         ^~~~
      |         sqrt
Language: C

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

int main(void){
  string s, t;
  int cnt=0;
  int aerase[100];
  int tease[100];
  cin >> s >> t;
  int flag = 1;
  for(int k=0;k<100;k++){
    flag = 0;
    for(int i=0;i<s.size();i++){
      for(int j=0;j<t.size();j++){
         if(s[i] == t[j]){
          s.erase(s.begin() + i); t.erase(t.begin() + j);
          flag = 1;
          break;
          } 
      }
    }
  }
  
  if(s < t){
    cout << "Yes";
  }else{
    cout << "No";
  }
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include"bits/stdc++.h"
#include"cstring"
using namespace std;
int main()
{
	char s[101],t[101];
	char tmp;
	gets(s);
	gets(t);
	for(int i=0;i<sizeof(s)/2;i++)
	{
		tmp=s[i];
		s[i]=s[sizeof(s)-i-1];
		s[sizeof(s)-i-1]=tmp;
	}
	for(int i=0;i<sizeof(t)/2;i++)
	{
		tmp=t[i];
		t[i]=t[sizeof(t)-i-1];
		t[sizeof(t)-i-1]=tmp;
	}
	if(strcmp(s,t)<0)
	{
		printf("Yes");
	}
	else
	{
		printf("No");
	}
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |         gets(s);
      |         ^~~~
      |         getw
Language: C++

#include"bits/stdc++.h"
using namespace std;
int main()
{
	char s[101],t[101];
	char tmp;
	gets(s);
	gets(t);
	for(int i=0;i<sizeof(s)/2;i++)
	{
		tmp=s[i];
		s[i]=s[sizeof(s)-i-1];
		s[sizeof(s)-i-1]=tmp;
	}
	for(int i=0;i<sizeof(t)/2;i++)
	{
		tmp=t[i];
		t[i]=t[sizeof(t)-i-1];
		t[sizeof(t)-i-1]=tmp;
	}
	if(strcmp(s,t)<0)
	{
		printf("Yes");
	}
	else
	{
		printf("No");
	}
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |         gets(s);
      |         ^~~~
      |         getw
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<stdlib.h>
int main(void) {
	std::string ss,tt;
	std::cin >> ss >> tt;
	std::sort(ss.begin(),ss.end());
	std::sort(tt.begin(), tt.end());
	char tem;
	for (int l1 = 0; l1 < tt.size()/2; l1++) {
		tem = tt.at(l1);
		tt.at(l1) = tt.at(tt.size() - l1-1);
		tt.at(tt.size() - l1-1) = tem;
	}
	if (strcmp(&ss.at(0), &tt.at(0)) >=0)
		std::cout << "No" << std::endl;
	else
		std::cout << "Yes" << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'strcmp' was not declared in this scope
   16 |         if (strcmp(&ss.at(0), &tt.at(0)) >=0)
      |             ^~~~~~
a.cc:5:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<stdlib.h>
  +++ |+#include <cstring>
    5 | int main(void) {
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
int main(void) {
	std::string ss,tt;
	std::cin >> ss >> tt;
	std::sort(ss.begin(),ss.end());
	std::sort(tt.begin(), tt.end());
	char tem;
	for (int l1 = 0; l1 < tt.size()/2; l1++) {
		tem = tt.at(l1);
		tt.at(l1) = tt.at(tt.size() - l1-1);
		tt.at(tt.size() - l1-1) = tem;
	}
	if (strcmp(&ss.at(0), &tt.at(0)) >=0)
		std::cout << "No" << std::endl;
	else
		std::cout << "Yes" << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'strcmp' was not declared in this scope
   15 |         if (strcmp(&ss.at(0), &tt.at(0)) >=0)
      |             ^~~~~~
a.cc:4:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<algorithm>
  +++ |+#include <cstring>
    4 | int main(void) {
Language: C

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  string s, t;
  cin >> s >> t;
  sort(s.begin(),s.end());
  sort(t.begin(),t.end());
  reverse(t.begin(),t.end());
  if(s < t) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++


#include<iostream>
#include<string>
#include<algorithm>
int main(void) {
	std::string ss,tt;
	std::cin >> ss >> tt;
	std::sort(ss.begin(),ss.end());
	std::sort(tt.begin(), tt.end());
	char tem;
	for (int l1 = 0; l1 < tt.size()/2; l1++) {
		tem = tt.at(l1);
		tt.at(l1) = tt.at(tt.size() - l1-1);
		tt.at(tt.size() - l1-1) = tem;
	}
	if (strcmp(&ss.at(0), &tt.at(0)) >=0)
		std::cout << "No" << std::endl;
	else
		std::cout << "Yes" << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'strcmp' was not declared in this scope
   16 |         if (strcmp(&ss.at(0), &tt.at(0)) >=0)
      |             ^~~~~~
a.cc:5:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<algorithm>
  +++ |+#include <cstring>
    5 | int main(void) {
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<string>
#include<cstring>
#include<algorithm>
using namespace std;
const int MaxN = 1e5;

int main()
{
	int a,b,c;
	char s[105],t[105];
	gets(s);
	gets(t);
	a = strlen(s);
	b = strlen(t);
	sort(s,s + a,greater<char>());
	sort(t,t + b,greater<char>());
	c = strcmp(s,t);
	if(c < 0) printf("Yes\n");
	else printf("No\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   14 |         gets(s);
      |         ^~~~
      |         getw
Language: C++


#include<iostream>
#include<string>
#include<algorithm>
int main(void) {
	std::string ss,tt;
	std::cin >> ss >> tt;
	std::sort(ss.begin(),ss.end());
	std::sort(tt.begin(), tt.end());
	char tem;
	for (int l1 = 0; l1 < tt.size()/2; l1++) {
		tem = tt.at(l1);
		tt.at(l1) = tt.at(tt.size() - l1-1);
		tt.at(tt.size() - l1-1) = tem;
	}
	if (strcmp(&ss.at(0), &tt.at(0)) >=0)
		std::cout << "No" << std::endl;
	else
		std::cout << "Yes" << std::endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'strcmp' was not declared in this scope
   16 |         if (strcmp(&ss.at(0), &tt.at(0)) >=0)
      |             ^~~~~~
a.cc:5:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<algorithm>
  +++ |+#include <cstring>
    5 | int main(void) {
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<string>
#include<algorithm>
using namespace std;
const int MaxN = 1e5;

int main()
{
	int a,b,c;
	char s[105],t[105];
	gets(s);
	gets(t);
	a = strlen(s);
	b = strlen(t);
	sort(s,s + a,greater<int>());
	sort(t,t + b,greater<int>());
	c = strcmp(s,t);
	if(c < 0) printf("Yes\n");
	else printf("No\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   14 |         gets(s);
      |         ^~~~
      |         getw
Language: C++

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

int compare_int(const void *a, const void *b)
{
    return *(char*)a - *(char*)b;
}

int mcompare_int(const void *a, const void *b)
{
    return *(char*)b - *(char*)a;
}


int main()
{
	char s[101]={0}, t[101]={0};
    int i;

	gets(s);
	gets(t);
    qsort(s, strlen(s), sizeof(char), compare_int);
    qsort(t, strlen(s)+1, sizeof(char), mcompare_int);
//	puts(s);
//	puts(t);
	if (strcmp(s,t)<0) printf("Yes\n");
	else printf("No\n");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   21 |         gets(s);
      |         ^~~~
      |         getw
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	char s[100];
	char t[100];
	cin >> s >> t;
	int lens = strlen(s);
	while (next_permutation(s, s + lens)){
		;
	}
	
	int lent = strlen(t);
	while (next_permutation(t, t + lent)){
		;
	}
	int iend = lent / 2;
	for (int i = 0; i <= iend; i++){
		char tmp = t[i];
		t[i] = t[lent - i - 1];
		t[lent - i - 1] = tmp;
	}
	if (strcmp(s, t) < 1){
		cout << "Yes" << endl;
	}
	else{
		cout << "No" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: 'strlen' was not declared in this scope
    8 |         int lens = strlen(s);
      |                    ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
a.cc:23:13: error: 'strcmp' was not declared in this scope
   23 |         if (strcmp(s, t) < 1){
      |             ^~~~~~
a.cc:23:13: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

n = int(input())
dic = {}

A = list(map(int, input().split()))

for a in A:
    if a in dic:
        dic[a] += 1
    else:
        dic[a] = 1

ans = 0

for key in dic:
    if dic[key] > key:
        ans += dic[key] - key
    else:
        ans += dic[key]

print(ans)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
a.cc:4:1: error: 'A' does not name a type
    4 | A = list(map(int, input().split()))
      | ^
Language: C++

#include<bits/stdc++.h>
#include <atcoder/all>
#define ll long long int
#define vec vector<ll>
#define mat vector<vector<ll>>

using namespace std;
using namespace atcoder;

const ll mod=1000000007;
const ll inf=LONG_LONG_MAX;
ll dx4[4]={1,0,-1,0};
ll dy4[4]={0,-1,0,1};
ll dx8[8]={1,0,-1,1,-1,1,0,-1};
ll dy8[8]={1,1,1,0,0,-1,-1,-1};

int main(){

  ll n;
  cin >> n;
  vec  a(n),b;
  for(ll i=0;i<n;i++)cin >> a[i];

  b=a;
  sort(b.begin(),b.end());
  b.erase(unique(b.begin(),b.end()),b.end());
  sort(a.begin(),a.end());

  ll ans=0;
  for(ll i=0;i<b.size();i++){
    ll p=b[i];
    ll c=upper_bound(a.begin(),a.end(),p)-lower_bound(a.begin(),a.end(),p);
    if(p>c)ans+=c;
    else{
      ans+=(c-p);
    }
  }

  cout << ans << endl;



  return 0;
}

Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    map<int,int>cnt;
int t,n,i,a;
cin>>n;
while(n--)
{
cin>>a;
cnt[a]++;
        int ans=0;
    for(auto u: cnt){
        if(u.second>=u.first) ans+=(u.second-u.first);
  else ans+=u.second;
    }
    cout<<ans<<endl;
}


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

#include <iostream>
#include <algorithm>
#include <map>
using namespace std;
int main(){
    int n;
    cin >> n;
    map<long long,long long>mp;
    for(int i=0; i<n; i++){
        int a;
        cin >> a;
        mp[a]++;
    }
    long long ans=0;
    for(auto itr = mp.begin(); itr != mp.end(); ++itr) {
        long long f = itr->first, s = itr->second;
       if(s<f){
           ans += s;
       }else{
           ans += n-x;
       }
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:21: error: 'x' was not declared in this scope
   20 |            ans += n-x;
      |                     ^
Language: C++

#pragma GCC optimize("Ofast")
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define uni(e) e.erase(unique(e.begin(),e.end()),e.end())
#define double long double
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
int INF=1e10;
int MOD=1e9+7;
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void yesno(T b){if(b)out("yes");else out("no");}
template<class T> void YesNo(T b){if(b)out("Yes");else out("No");}
template<class T> void YESNO(T b){if(b)out("YES");else out("NO");}
template<class T> void noyes(T b){if(b)out("no");else out("yes");}
template<class T> void NoYes(T b){if(b)out("No");else out("Yes");}
template<class T> void NOYES(T b){if(b)out("NO");else out("YES");}
int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
}
int kurai(int a,int b){
  int m=pow(10,b),n=pow(10,b-1);
  return (a%m)/n;
}
int ketawa(int a){
  int k=0;
  rep(i,keta(a)){
  k+=kurai(a,i+1);
  }
  return k;
}
int gcd(int a,int b){
  if(a%b==0)
    return b;
  return gcd(b,a%b);
}
int lcm(int a,int b){
    return a/gcd(a,b)*b;
}
int mid(int a,int b,int c){
  vector<int> k(3);
  k[0]=a;k[1]=b;k[2]=c;
  sort(all(k));
  return k[1];
}
bool sosuu(int a){
  bool b=1;
  if(a<=1)
    return 0;
  else{
  rep1(i,sqrt(a)-1){
  if(a%(i+1)==0)
  b=0;
  }
  return b;
  }
}
int modpow(int a,int b,int m=MOD){
 if(!b)return 1; if(b&1)return modpow(a,b-1,m)*a%m;
 int memo = modpow(a,b>>1,m);
 return memo*memo%m;
}
int fact_mod(int n) {
    int f=1; 
for(int i=2;i<n+1;i++) f=f*(i%MOD)% MOD;
    return f;
}
int mod_pow(int x,int n) {
    int res=1;
    while(n>0){
        if(n&1) res=(res*x)%MOD; 
        x=(x*x)%MOD;        
n>>=1; 
    }
    return res;
}
int c_mod(int n, int r) {
    if(r>n-r) r=n-r;
    if(r==0) return 1;
    int a=1;
    rep(i,r) 
a=a*((n-i)%MOD)%MOD;
    int b=mod_pow(fact_mod(r), MOD-2);
    return (a%MOD)*(b%MOD)%MOD;
}
signed main(){
  int a;
  cin>>a;
  vector<int> b(a),c(a);
  map<int,int> f;
  rep(i,a)
    cin>>b[i];
  sort(all(b));
  int d=1;
  c[0]=b[0];
  f[b[0]]++;
  rep(i,a-1){
  if(b[i]!=b[i+1]){
  c[e]=b[i+1];
    d+=1;
  }
    f[b[i]]++;
  }
  int g=0;
  rep(i,a){
  if(c[i]<=f[c[i]])
    g+=f[c[i]]-c[i];
    else
      g+=f[c[i]];
  }
  out(g);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:109:5: error: 'e' was not declared in this scope
  109 |   c[e]=b[i+1];
      |     ^
Language: C++

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

int main(){

  long long N,i,Sum=0;
  cin>>N;
  map<long long> A;
  
  for(i=0;i<N;i++){
    long long a;
    cin>>a;
    A[a]++;
  }
  
  for(auto p:A){
    
    if(p.first>p.second)Sum+=p.second;
    if(p.first<p.second)Sum+=p.second-p.first;
  }
  cout<<Sum<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: wrong number of template arguments (1, should be at least 2)
    8 |   map<long long> A;
      |                ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:13:6: error: invalid types 'int[long long int]' for array subscript
   13 |     A[a]++;
      |      ^
a.cc:16:14: error: 'begin' was not declared in this scope
   16 |   for(auto p:A){
      |              ^
a.cc:16:14: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:16:14: error: 'end' was not declared in this scope
   16 |   for(auto p:A){
      |              ^
a.cc:16:14: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
Language: C++

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

int main() {
    //
    long long num;
    long long tmp;
    long long cnt = 0;
    map<long long, long long> m;

    cin >> num;

    for (long long i = 0; i < num; i++) {
        cin >> tmp;
        m[tmp]++;
    }

    for (auto itr : m) {
        if (itr.firse > itr.second) cnt += itr.second;
        else cnt += abs(itr.first - itr.second);
      }

    cout << cnt;
    //
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: 'struct std::pair<const long long int, long long int>' has no member named 'firse'; did you mean 'first'?
   19 |         if (itr.firse > itr.second) cnt += itr.second;
      |                 ^~~~~
      |                 first
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
using namespace std;

#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j,k
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define sort(a) sort(a.begin(),a.end())
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define sizeoof(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll i,ans=1;rep(i,0,n)ans*=x;return ans;}
/*階乗*/ll fact(ll x){ll i,ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)/fact(r)/fact(n-r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;ll i;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
ll ans=0;llfor;///////////////////////////////////////////////////////////
int main(){
 ll n;
 sc(n);
 ll a[n+10];
 ll mx=0;
 rep(i,0,n){
  sc(a[i]);
  mx=max(mx,a[i]);
 }
 vector<ll>cnt(mx+10);
 rep(i,0,mx+1)cnt[i]=0;
 rep(i,0,n){
  cnt[a[i]]++;
  if(cnt[a[i]]>a[i]){pr(ans++;}
 }
 rep(i,0,n){
  if(cnt[a[i]]<a[i]){ans++;}
 }
 pr(ans);
return 0;}

Compiler output:
a.cc:66:11: error: unterminated argument list invoking macro "pr"
   66 | return 0;}
      |           ^
a.cc: In function 'int main()':
a.cc:60:22: error: 'pr' was not declared in this scope
   60 |   if(cnt[a[i]]>a[i]){pr(ans++;}
      |                      ^~
a.cc:60:24: error: expected '}' at end of input
   60 |   if(cnt[a[i]]>a[i]){pr(ans++;}
      |                     ~  ^
a.cc:60:24: error: expected '}' at end of input
a.cc:58:12: note: to match this '{'
   58 |  rep(i,0,n){
      |            ^
a.cc:60:24: error: expected '}' at end of input
   60 |   if(cnt[a[i]]>a[i]){pr(ans++;}
      |                        ^
a.cc:47:11: note: to match this '{'
   47 | int main(){
      |           ^
Language: C++

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

using ll = long long;
using ld = long double;
using vi = vector<int>;
using vll = vector<ll>;
using P = pair<int, int>;

constexpr int INF = 1e9;
constexpr ll INFLL = 1e18;
constexpr int MOD = 1e9 + 7;
const ld PI = acosl(-1);

#define rep(i,n) for(int i=0; i<(n); ++i)
#define all(n) n.begin(),n.end()

int main(){
    ios::sync_with_stdio(false); cin.tie(nullptr);
    //cout << fixed << setprecision(6);
    int n; cin >> n;
    vi a(n);
    rep(i, n) cin >> a[i];

    map<int, int> m;
    int ans = 0;
    for(int i : a) m[i]++;
    for(auto i : m){
        if(i.first == i.second) continue;
        ans += i.second % i.first;
    }

    cout << ans << endl;
    return 0;
}#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ld = long double;
using vi = vector<int>;
using vll = vector<ll>;
using P = pair<int, int>;

constexpr int INF = 1e9;
constexpr ll INFLL = 1e18;
constexpr int MOD = 1e9 + 7;
const ld PI = acosl(-1);

#define rep(i,n) for(int i=0; i<(n); ++i)
#define all(n) n.begin(),n.end()

int main(){
    ios::sync_with_stdio(false); cin.tie(nullptr);
    //cout << fixed << setprecision(6);
    int n; cin >> n;
    vi a(n);
    rep(i, n) cin >> a[i];

    map<int, int> m;
    int ans = 0;
    for(int i : a) m[i]++;
    for(auto i : m){
        if(i.first == i.second) continue;
        ans += i.second % i.first;
    }

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc:35:2: error: stray '#' in program
   35 | }#include <bits/stdc++.h>
      |  ^
a.cc:35:3: error: 'include' does not name a type
   35 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:44:15: error: redefinition of 'constexpr const int INF'
   44 | constexpr int INF = 1e9;
      |               ^~~
a.cc:10:15: note: 'constexpr const int INF' previously defined here
   10 | constexpr int INF = 1e9;
      |               ^~~
a.cc:45:14: error: redefinition of 'constexpr const ll INFLL'
   45 | constexpr ll INFLL = 1e18;
      |              ^~~~~
a.cc:11:14: note: 'constexpr const ll INFLL' previously defined here
   11 | constexpr ll INFLL = 1e18;
      |              ^~~~~
a.cc:46:15: error: redefinition of 'constexpr const int MOD'
   46 | constexpr int MOD = 1e9 + 7;
      |               ^~~
a.cc:12:15: note: 'constexpr const int MOD' previously defined here
   12 | constexpr int MOD = 1e9 + 7;
      |               ^~~
a.cc:47:10: error: redefinition of 'const ld PI'
   47 | const ld PI = acosl(-1);
      |          ^~
a.cc:13:10: note: 'const ld PI' previously defined here
   13 | const ld PI = acosl(-1);
      |          ^~
a.cc:52:5: error: redefinition of 'int main()'
   52 | int main(){
      |     ^~~~
a.cc:18:5: note: 'int main()' previously defined here
   18 | int main(){
      |     ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <math.h>
using namespace std;

int main()
{
   int N;
   cin >> N;
   vector<int> a(N);
   for(int i = 0; i < N; i++) cin >> a[i];
   sort(a.begin(),a.end());
   int ans = 0;
   int x = a[0];
   int count = 0;
    for(int i = 0; i < N; i++)
    {
        if(x == a[i]) count++;
        else
        {
            if(count != x || count > x)
            {
                if(count > x) ans += count - x;
                else ans += count;
            }
            x = a[i];
            count = 1;
        }
    }
    if(count > x) ans += count - x;
    if(count < x) ans += count;
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:4: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   13 |    sort(a.begin(),a.end());
      |    ^~~~
      |    sqrt
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;cin>>N;
  vector<long long>A(N);
  for(int i=0;i<N;i++){
    cin>>A[i];
  }
  sort(A.begin(),A.end());
  vector<pair<long long,long long>>B;
  long long mark=0;
  for(int i=0;i<N;i++){
    if(A[i]!=mark){
      mark=A[i];
      B.push_back(make_pair(A[i],1));
    }
    else{
      B.at(B.size()-1).second++;
    }
  }
  long long count=0;
  for(int j=0;j<B.size();j++){
    if(B[i].first<B[i].second){
      count=count+B[i].second-B[i].first;
    }
    else if(B[i].first>B[i].second){
      count=count+B[i].second;
    }
  }
  cout<<count<<endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:23:10: error: 'i' was not declared in this scope
   23 |     if(B[i].first<B[i].second){
      |          ^
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  cin >> a[i];
  vector<int> cnt(n);
  int ans=0;
  for (int i=0;i<n;++i){
    if (a[i]>n){
      ans++;
    }
    else {
      cnt[a[i]]++;
    }
  }
  for (int i=1;i<=n;++i){
    if (cnt[i]>i){
      ans+=cnt[i]-i;
    }
    else {
      ans+=cnt[i];
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'i' was not declared in this scope
    8 |   cin >> a[i];
      |            ^