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

#include<iostream>
using namespase std;
int main() {
	int a, b;
	cin >> a >> b;
	cout << a*b/3.305785;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin >> a >> b;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         cout << a*b/3.305785;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <stdio.h>
void main()
{int a,b,ab;
float tubo;
printf("???*?¨?????(??°??????????§?????????????????????\??????????????¨???\n)");
scanf("%d %d",a,b);
ab=a*b,tubo=ab/3.305785;
printf("?????°???%f",tubo);
return ;
}

Compiler output:
a.cc:5:18: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
    5 | printf("???*?¨?????(??°??????????§?????????????????????\??????????????¨???\n)");
a.cc:2:1: error: '::main' must return 'int'
    2 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:1: error: return-statement with no value, in function returning 'int' [-fpermissive]
    9 | return ;
      | ^~~~~~
Language: C++

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

int main() {
  int a, b;
  cin >> a >> b;
  cout << fixed << setprecision(10) << a * b / 3.305785 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: 'setprecision' was not declared in this scope
   11 |   cout << fixed << setprecision(10) << a * b / 3.305785 << endl;
      |                    ^~~~~~~~~~~~
a.cc:6:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    5 | #include<cstdio>
  +++ |+#include <iomanip>
    6 | using namespace std;
Language: C++

#include <iostream>
#include <math.h>
using namespace std;
int main(void) 
{
	int a, b;
	double S;
	cin >> a >> b;
	S = a * b / 3.305785;
	cout << fixed << setprecision(6) << S << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: 'setprecision' was not declared in this scope
   10 |         cout << fixed << setprecision(6) << S << endl;
      |                          ^~~~~~~~~~~~
a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    2 | #include <math.h>
  +++ |+#include <iomanip>
    3 | using namespace std;
Language: C++

#include<iostream>
using namespace std;

int main()
{
 cin>>x>>y;
 cout<<(x+y)/3.305785<<endl;
 return 0;
 }

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

#include<iostream>
using namespace std;

int main()
{
 while(true)
 {
 cin>>x>>y;
  }
 cout<<(x+y)/3.305785<<endl;
 return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'x' was not declared in this scope
    8 |  cin>>x>>y;
      |       ^
a.cc:8:10: error: 'y' was not declared in this scope
    8 |  cin>>x>>y;
      |          ^
a.cc:10:9: error: 'x' was not declared in this scope
   10 |  cout<<(x+y)/3.305785<<endl;
      |         ^
a.cc:10:11: error: 'y' was not declared in this scope
   10 |  cout<<(x+y)/3.305785<<endl;
      |           ^
Language: C++

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

int main()
{
 int x,y;
 cin>>x>>y;
 cout<<precision(6)<<(x+y)/3.305785<<endl;
 return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'precision' was not declared in this scope
    9 |  cout<<precision(6)<<(x+y)/3.305785<<endl;
      |        ^~~~~~~~~
Language: C++

#include<iostream>
using namespae std;

int main()
{
 int x,y;
 cin>>x>>y;
 cout<<(x*y)/3.305785<<endl;
 return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespae'
    2 | using namespae std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |  cin>>x>>y;
      |  ^~~
      |  std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |  cout<<(x*y)/3.305785<<endl;
      |  ^~~~
      |  std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |  cout<<(x*y)/3.305785<<endl;
      |                        ^~~~
      |                        std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

include<iostream>
#include<cstdio>

using namespace std;

int main(void){
  double a,b;
  cin >> a >> b;
  printf("%.6f\n",a*b/3.305785);
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin >> a >> b;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<cstdio>
  +++ |+#include <iostream>
    3 |
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int main (void) {
  int a, b;
  double res;

  cin >> a >> b;

  res = a * b / 3.305785;
  
  printf("%.6lf\n", res)
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: expected ';' before 'return'
   14 |   printf("%.6lf\n", res)
      |                         ^
      |                         ;
   15 | 
   16 |   return 0;
      |   ~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
double a,b;
int c;
cin>>a>>b;
c=a*b/3.305785
cout<<c<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'cout'
    7 | c=a*b/3.305785
      |               ^
      |               ;
    8 | cout<<c<<endl;
      | ~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b;
c=a*b/3.305785
cout<<c<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected ';' before 'cout'
    6 | c=a*b/3.305785
      |               ^
      |               ;
    7 | cout<<c<<endl;
      | ~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
double a,b,c;
cin>>a>>b;
c=(a*b)/3.305785;
cout<<showpoint<<setprecision(7)<<c<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: 'setprecision' was not declared in this scope
    7 | cout<<showpoint<<setprecision(7)<<c<<endl;
      |                  ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    1 | #include <iostream>
  +++ |+#include <iomanip>
    2 | using namespace std;
Language: C++

#include <c.stdio> 
int main(void) {
    int a,b;
    scanf("%d%d",&a,&b);
    printf("%.15f\n",(double)a*b/3.305785);
    return 0;
}

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

#include <stdio.h>

int main(){
    float a,b;
    scanf( "%f %f",&a,&b );
    printf( "%f\n",a * b / 3.305785 );

Compiler output:
a.cc: In function 'int main()':
a.cc:6:39: error: expected '}' at end of input
    6 |     printf( "%f\n",a * b / 3.305785 );
      |                                       ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C

#include <stdio.h>

int num[100], val[100];
int main(viod)
{
int i= 0;, n, mmn = 100,maxv = 0;

scanf("%d", &n);
for (i = 0; i< n; i++){
scanf("%d %d", &num[i], &val[i]);
if (maxc < val[i]){
maxv = val[i];}
}
for (i =0; i< n; i++){
if (maxv == val[i] && minn > num[i]){
minn = num[i];
}
}
printf("%d %d", minn, maxv);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:4:5: error: type of 'viod' defaults to 'int' [-Wimplicit-int]
    4 | int main(viod)
      |     ^~~~
main.c:6:10: error: expected expression before ',' token
    6 | int i= 0;, n, mmn = 100,maxv = 0;
      |          ^
main.c:6:12: error: 'n' undeclared (first use in this function)
    6 | int i= 0;, n, mmn = 100,maxv = 0;
      |            ^
main.c:6:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:15: error: 'mmn' undeclared (first use in this function)
    6 | int i= 0;, n, mmn = 100,maxv = 0;
      |               ^~~
main.c:6:25: error: 'maxv' undeclared (first use in this function)
    6 | int i= 0;, n, mmn = 100,maxv = 0;
      |                         ^~~~
main.c:11:5: error: 'maxc' undeclared (first use in this function)
   11 | if (maxc < val[i]){
      |     ^~~~
main.c:15:23: error: 'minn' undeclared (first use in this function)
   15 | if (maxv == val[i] && minn > num[i]){
      |                       ^~~~
Language: C

#include<stdio.h>

int main(void){
int t,a,v,i,max,num;

scanf("%d",&t)
max=0;
for(i=0;i<t;i++){
scanf("%d%d",&a,&v);
if(max<v){
max=v;
num=a;
}
}
printf("%d %d\n",num,max);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:15: error: expected ';' before 'max'
    6 | scanf("%d",&t)
      |               ^
      |               ;
    7 | max=0;
      | ~~~            
main.c: At top level:
main.c:17:1: error: expected identifier or '(' before 'return'
   17 | return 0;
      | ^~~~~~
main.c:18:1: error: expected identifier or '(' before '}' token
   18 | }
      | ^
Language: C

#include<stdio.h>

int main(void){
int t,a,v,i,max,num;

scanf("%d",&t)
max=0;
for(i=0;i<t;i++){
scanf("%d%d",&a,&v);
if(max<v){
max=v;
num=a;
}
}
printf("%d %d\n",num,max);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:15: error: expected ';' before 'max'
    6 | scanf("%d",&t)
      |               ^
      |               ;
    7 | max=0;
      | ~~~
Language: C

#include <stdio.h>

int main(){
	int a,d,b,c,e,i;
	b=0;
	scanf("%d",&a);
	for(i=0;i<a;i++){
		scanf("%d %d",&c[i],&d[i]);
		if(b<d[i]){
			b=d[i];
			e=c[i];
		}
		printf("%d\n",i);
	}
	printf("%d %d\n",e,d);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:33: error: subscripted value is neither array nor pointer nor vector
    8 |                 scanf("%d %d",&c[i],&d[i]);
      |                                 ^
main.c:8:39: error: subscripted value is neither array nor pointer nor vector
    8 |                 scanf("%d %d",&c[i],&d[i]);
      |                                       ^
main.c:9:23: error: subscripted value is neither array nor pointer nor vector
    9 |                 if(b<d[i]){
      |                       ^
main.c:10:28: error: subscripted value is neither array nor pointer nor vector
   10 |                         b=d[i];
      |                            ^
main.c:11:28: error: subscripted value is neither array nor pointer nor vector
   11 |                         e=c[i];
      |                            ^
Language: C

#include <stdio.h>

int main(){
	int a,d[100],b,c[100],e,i;
	b=0;
	scanf("%d",&a);
	for(i=0;i<a;i++){
		scanf("%d %d",&c,&d;
		if(b<d){
			b=d;
			e=c;
		}
	}
	printf("%d %d\n",e,b);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:36: error: expected ')' before ';' token
    8 |                 scanf("%d %d",&c,&d;
      |                      ~             ^
      |                                    )
main.c:12:18: error: expected ';' before '}' token
   12 |                 }
      |                  ^
      |                  ;
   13 |         }
      |         ~
Language: C

#include <stdio.h>

int main(){
	int a,d,b,c,e,i;
	b=0;
	scanf("%d",&a);
	for(i=0;i<a;i++){
		scanf("%d %d",&c,&d;
		if(b<d){
			b=d;
			e=c;
		}
	}
	printf("%d %d\n",e,b);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:36: error: expected ')' before ';' token
    8 |                 scanf("%d %d",&c,&d;
      |                      ~             ^
      |                                    )
main.c:12:18: error: expected ';' before '}' token
   12 |                 }
      |                  ^
      |                  ;
   13 |         }
      |         ~
Language: C

#include<stdio.h>
int main(void){
	int number;
	int a[20],b[20];
	int i;
	int max = 0;
	int min = 0;
	int x = 0;
	scanf("%d",&number);
	for(i = 0;i < number;i++){
		scanf("%d %d",&a[i],&b[i]);
		if(b[i] > max){
			max = b[i];
			x = a[i];
		}
	}
	for(i = 0;i < number;i++;){
		if(b[i] == max && a[i] < x){
			min = a[i];
		}
	printf("%d %d\n",min,max);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:33: error: expected ')' before ';' token
   17 |         for(i = 0;i < number;i++;){
      |            ~                    ^
      |                                 )
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

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

int main(){
	int a, b[20], c[20], i, s = 0, ans;
	scanf("%d", &a);
	for(i = 0; i < a; i++){
		scanf("%d %d", &b[i], &c[i]);
		if(s < c[i]){
			s = c[i];
			ans = i;
		}
	}
	printf("%d %d\n", b[ans], c[ans])
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:42: error: expected ';' before 'return'
   14 |         printf("%d %d\n", b[ans], c[ans])
      |                                          ^
      |                                          ;
   15 |         return 0;
      |         ~~~~~~
Language: C

#include<iostream>
#include<algorithm>

using namespace std;

int main(){
    int n, a, b;
    cin >> n;
    int ra = 1 << 29;
    int rb = -100;
    for(int i = 0;i < n;i++){
	cin >> a >> b;
	if(rb < b || rb == b && ra > a){
	    ra = a;
	    rb = b;
	}
    }
    cout << ra << " " << rb << endl;
    return 0;
}

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

#include<stdio.h>
int main(){
int n,a,v,i,x,y;
scanf("%d",&n);
x=0;
y=0;
for(i=0;i<n;i++){
scanf("%d %d",&a,&v);
if(y<v){
x=a;
y=v;
}
}
if(x==0)[
x=1;
y=0;
}
printf("%d %d\n",x,y);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:9: error: expected expression before '[' token
   14 | if(x==0)[
      |         ^
main.c:16:5: error: expected ';' before '}' token
   16 | y=0;
      |     ^
      |     ;
   17 | }
      | ~    
main.c: At top level:
main.c:18:8: error: expected declaration specifiers or '...' before string constant
   18 | printf("%d %d\n",x,y);
      |        ^~~~~~~~~
main.c:18:18: error: unknown type name 'x'
   18 | printf("%d %d\n",x,y);
      |                  ^
main.c:18:20: error: unknown type name 'y'
   18 | printf("%d %d\n",x,y);
      |                    ^
main.c:19:1: error: expected identifier or '(' before 'return'
   19 | return 0;
      | ^~~~~~
main.c:20:1: error: expected identifier or '(' before '}' token
   20 | }
      | ^
Language: C++

#include <iostream>
using namespace std;
int main(){
    int n;
    cin >> n;
    int max=0; int kouho =0;
    for(int i=0;i<n;i++){
        int a,b;
        cin >> a >> b;
        if(max < b){
            max = b;
            kouho = a;
        }
    }
    cout << a << " " << b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'a' was not declared in this scope
   15 |     cout << a << " " << b << endl;
      |             ^
a.cc:15:25: error: 'b' was not declared in this scope
   15 |     cout << a << " " << b << endl;
      |                         ^
Language: C++

#include<stdio.h>

int main(){

int x,y,n;
int X=0,Y=0;


scanf("%d",&n);

for(int i=0;i<n;i++)
{
scanf("%d %d",&x,&y);
if(Y<y){X=x;Y=y}
}

printf("%d %d\n",X,Y);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected ';' before '}' token
   14 | if(Y<y){X=x;Y=y}
      |                ^
      |                ;
Language: C++

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include "oki.h"

////////////////*My library*////////////////////////
#define rep_to(a,i,n) for(i=a;i<n;i++)
#define rep(i,n) for(i=0;i<n;i++)
#define rep_r(i,n) for(i=n-1;i>=0;i--)
#define debug_i(x) printf("x:%d\n",x)
#define debug_s(str) printf("str:%s\n",str)
#define debug_c(c) printf("c:%c\n",c)
#define s_i1(x) scanf("%d",&x)
#define s_i2(x,y) scanf("%d %d",&x,&y)
#define s_i3(x,y,z) scanf("%d %d %d",&x,&y,&z)
////////////////////////////////////////////////////
////////////////////////
/*prime()*/
/*primecount()*/
/*sort()*/
///////////////////////

int main()
{
	int i,j,k;
	int n,q;
	int x,y,num=0,sd_num=0;
	double max=0,sd_max=0;
	int a[100000]={},v[100000]={};

	s_i1(n);
	rep(i,n)
	{
		scanf("%d %d",&x,&y);
		v[x]+=y;

		num=(max<v[x])? x : num;
		max=fmax(v[x],max);
	}
	printf("%d %d\n",num,(int)max);
	return 0;
}

Compiler output:
a.cc:6:10: fatal error: oki.h: No such file or directory
    6 | #include "oki.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
int main(void)
{
	int n,a,b,c,i,max,min;
	max=-1;
	min=101;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d",&a,&b);
		if(max<b){
			max=b;
			c=a;
	/*	}
		if(min>c){
			min=c;
		}*/
		
	}
	printf("%d %d\n",min,max);
	return 0;
}

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

#include <iostream>
using namespace std;
 
int main()
{
  int n;
  int min = 21, max = 0;
  int a, v;

  cin >> n;
  for (int i = 0; i < n; i++){
    cin >> a >> v;
    if (max < v){
      max = v;
      min = a;
    }
    else if (max == v){
      if (w1 > a){
        min = a;
      }
    }
  }
  cout << w1 << ' ' << max << endl;
  return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: 'w1' was not declared in this scope
   18 |       if (w1 > a){
      |           ^~
a.cc:23:11: error: 'w1' was not declared in this scope
   23 |   cout << w1 << ' ' << max << endl;
      |           ^~
Language: C++

#include <iostream>
#include <vector>

typedef pair<int, int> P;

using namespace std;

void solve(vector<P> v) {
	int minID, maxNum;
	minID = v[0].first();
	maxNum = v[0].second();
	for (int i = 1; i < v.size(); i++) 
		if (v[i].second > maxNum || (v[i].second == maxNum && v[i].first < minID)) {
			minID = v[i].first();
			maxNum = v[i].second();
		}

	cout << minID << " " << maxNum << endl;
}


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n, a, v;
	cin >> n;
	vector<P> fish;
	for (int i = 0; i < n; i++) {
		cin >> a >> v;
		fish.push_back(P(a, v));
	}
	solve(fish);
}

Compiler output:
a.cc:4:9: error: 'pair' does not name a type
    4 | typedef pair<int, int> P;
      |         ^~~~
a.cc:8:19: error: 'P' was not declared in this scope
    8 | void solve(vector<P> v) {
      |                   ^
a.cc:8:20: error: template argument 1 is invalid
    8 | void solve(vector<P> v) {
      |                    ^
a.cc:8:20: error: template argument 2 is invalid
a.cc: In function 'void solve(int)':
a.cc:10:18: error: invalid types 'int[int]' for array subscript
   10 |         minID = v[0].first();
      |                  ^
a.cc:11:19: error: invalid types 'int[int]' for array subscript
   11 |         maxNum = v[0].second();
      |                   ^
a.cc:12:31: error: request for member 'size' in 'v', which is of non-class type 'int'
   12 |         for (int i = 1; i < v.size(); i++)
      |                               ^~~~
a.cc:13:22: error: invalid types 'int[int]' for array subscript
   13 |                 if (v[i].second > maxNum || (v[i].second == maxNum && v[i].first < minID)) {
      |                      ^
a.cc:13:47: error: invalid types 'int[int]' for array subscript
   13 |                 if (v[i].second > maxNum || (v[i].second == maxNum && v[i].first < minID)) {
      |                                               ^
a.cc:13:72: error: invalid types 'int[int]' for array subscript
   13 |                 if (v[i].second > maxNum || (v[i].second == maxNum && v[i].first < minID)) {
      |                                                                        ^
a.cc:14:34: error: invalid types 'int[int]' for array subscript
   14 |                         minID = v[i].first();
      |                                  ^
a.cc:15:35: error: invalid types 'int[int]' for array subscript
   15 |                         maxNum = v[i].second();
      |                                   ^
a.cc: In function 'int main()':
a.cc:28:16: error: 'P' was not declared in this scope
   28 |         vector<P> fish;
      |                ^
a.cc:28:17: error: template argument 1 is invalid
   28 |         vector<P> fish;
      |                 ^
a.cc:28:17: error: template argument 2 is invalid
a.cc:31:22: error: request for member 'push_back' in 'fish', which is of non-class type 'int'
   31 |                 fish.push_back(P(a, v));
      |                      ^~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <utility>

typedef pair<int, int> P;

using namespace std;

void solve(vector<P> v) {
	int minID, maxNum;
	minID = v[0].first();
	maxNum = v[0].second();
	for (int i = 1; i < v.size(); i++) 
		if (v[i].second > maxNum || (v[i].second == maxNum && v[i].first < minID)) {
			minID = v[i].first();
			maxNum = v[i].second();
		}

	cout << minID << " " << maxNum << endl;
}


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n, a, v;
	cin >> n;
	vector<P> fish;
	for (int i = 0; i < n; i++) {
		cin >> a >> v;
		fish.push_back(P(a, v));
	}
	solve(fish);
}

Compiler output:
a.cc:5:9: error: 'pair' does not name a type
    5 | typedef pair<int, int> P;
      |         ^~~~
a.cc:9:19: error: 'P' was not declared in this scope
    9 | void solve(vector<P> v) {
      |                   ^
a.cc:9:20: error: template argument 1 is invalid
    9 | void solve(vector<P> v) {
      |                    ^
a.cc:9:20: error: template argument 2 is invalid
a.cc: In function 'void solve(int)':
a.cc:11:18: error: invalid types 'int[int]' for array subscript
   11 |         minID = v[0].first();
      |                  ^
a.cc:12:19: error: invalid types 'int[int]' for array subscript
   12 |         maxNum = v[0].second();
      |                   ^
a.cc:13:31: error: request for member 'size' in 'v', which is of non-class type 'int'
   13 |         for (int i = 1; i < v.size(); i++)
      |                               ^~~~
a.cc:14:22: error: invalid types 'int[int]' for array subscript
   14 |                 if (v[i].second > maxNum || (v[i].second == maxNum && v[i].first < minID)) {
      |                      ^
a.cc:14:47: error: invalid types 'int[int]' for array subscript
   14 |                 if (v[i].second > maxNum || (v[i].second == maxNum && v[i].first < minID)) {
      |                                               ^
a.cc:14:72: error: invalid types 'int[int]' for array subscript
   14 |                 if (v[i].second > maxNum || (v[i].second == maxNum && v[i].first < minID)) {
      |                                                                        ^
a.cc:15:34: error: invalid types 'int[int]' for array subscript
   15 |                         minID = v[i].first();
      |                                  ^
a.cc:16:35: error: invalid types 'int[int]' for array subscript
   16 |                         maxNum = v[i].second();
      |                                   ^
a.cc: In function 'int main()':
a.cc:29:16: error: 'P' was not declared in this scope
   29 |         vector<P> fish;
      |                ^
a.cc:29:17: error: template argument 1 is invalid
   29 |         vector<P> fish;
      |                 ^
a.cc:29:17: error: template argument 2 is invalid
a.cc:32:22: error: request for member 'push_back' in 'fish', which is of non-class type 'int'
   32 |                 fish.push_back(P(a, v));
      |                      ^~~~~~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
int a,b,c;
int n;
int main(){
cin>>n;
pair<int,int> p[n];
for (int i = 0; i < n; ++i) {
	cin>>a>>b;
	p[i].second=a;p[i].first=-b;
}
sort(p,p+n);
cout<<p[0].second<<" "<<-p[0].first<<endl;
//cout<<p[n-1].second<<" "<<-p[n-1].first<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:13:43: error: expected '}' at end of input
   13 | cout<<p[0].second<<" "<<-p[0].first<<endl;
      |                                           ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
int a,v,M;main(A){for(std::cin>>a;std::cin>>a>>v;)M<v&&(M=v)&(A=a);std::printf("%d %d\n",A,M); }

Compiler output:
a.cc:2:15: error: expected constructor, destructor, or type conversion before '(' token
    2 | int a,v,M;main(A){for(std::cin>>a;std::cin>>a>>v;)M<v&&(M=v)&(A=a);std::printf("%d %d\n",A,M); }
      |               ^
Language: C++

#include<iostream>
int a,v,M;
main(A)
{
for(std::cin>>a;std::cin>>a>>v;)M<v&&(M=v)&(A=a);
std::printf("%d %d\n",A,M); 
}

Compiler output:
a.cc:3:5: error: expected constructor, destructor, or type conversion before '(' token
    3 | main(A)
      |     ^
Language: C++

#include<iostream>
int a,v,M;main(A){for(std::cin>>a;std::cin>>a>>v;)M<v&&(M=v)&(A=a);std::cout<<A<<" "<<M<<"\n";}

Compiler output:
a.cc:2:15: error: expected constructor, destructor, or type conversion before '(' token
    2 | int a,v,M;main(A){for(std::cin>>a;std::cin>>a>>v;)M<v&&(M=v)&(A=a);std::cout<<A<<" "<<M<<"\n";}
      |               ^
Language: C++

#include<iostream>
main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}

Compiler output:
a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token
    2 | main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |     ^
Language: C++

#include<iostream>
main(int a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}

Compiler output:
a.cc:2:12: error: 'v' has not been declared
    2 | main(int a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |            ^
a.cc:2:14: error: 'A' has not been declared
    2 | main(int a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |              ^
a.cc:2:16: error: 'V' has not been declared
    2 | main(int a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                ^
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(int a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      | ^~~~
a.cc:2:1: warning: second argument of 'int main(int, int, int, int)' should be 'char **' [-Wmain]
a.cc:2:1: warning: third argument of 'int main(int, int, int, int)' should probably be 'char **' [-Wmain]
a.cc:2:1: warning: 'int main(int, int, int, int)' takes only zero or two arguments [-Wmain]
a.cc: In function 'int main(int, int, int, int)':
a.cc:2:33: error: 'A' was not declared in this scope
    2 | main(int a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                                 ^
a.cc:2:48: error: 'v' was not declared in this scope
    2 | main(int a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                                                ^
a.cc:2:51: error: 'V' was not declared in this scope
    2 | main(int a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                                                   ^
a.cc:2:94: error: 'A' was not declared in this scope
    2 | main(int a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                                                                                              ^
a.cc:2:102: error: 'V' was not declared in this scope
    2 | main(int a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                                                                                                      ^
Language: C++

#include<iostream>
int main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}

Compiler output:
a.cc:2:5: error: cannot declare '::main' to be a global variable
    2 | int main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |     ^~~~
a.cc:2:10: error: 'a' was not declared in this scope
    2 | int main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |          ^
a.cc:2:12: error: 'v' was not declared in this scope
    2 | int main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |            ^
a.cc:2:14: error: 'A' was not declared in this scope
    2 | int main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |              ^
a.cc:2:16: error: 'V' was not declared in this scope
    2 | int main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                ^
a.cc:2:17: error: expression list treated as compound expression in initializer [-fpermissive]
    2 | int main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                 ^
Language: C++

#include<iostream>
a,v,A,V;main(){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}

Compiler output:
a.cc:2:1: error: 'a' does not name a type
    2 | a,v,A,V;main(){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      | ^
a.cc:2:9: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | a,v,A,V;main(){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |         ^~~~
a.cc: In function 'int main()':
a.cc:2:30: error: 'A' was not declared in this scope
    2 | a,v,A,V;main(){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                              ^
a.cc:2:42: error: 'a' was not declared in this scope
    2 | a,v,A,V;main(){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                                          ^
a.cc:2:45: error: 'v' was not declared in this scope
    2 | a,v,A,V;main(){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                                             ^
a.cc:2:48: error: 'V' was not declared in this scope
    2 | a,v,A,V;main(){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                                                ^
a.cc:2:91: error: 'A' was not declared in this scope
    2 | a,v,A,V;main(){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                                                                                           ^
a.cc:2:99: error: 'V' was not declared in this scope
    2 | a,v,A,V;main(){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |                                                                                                   ^
Language: C++

#include<iostream>
int a,v,V;main(A){for(std::cin>>A;std::cin>>a>>v;)(V<v||V==v&&A>a)&&(V=v)&(A=a);std::cout<<A<<" "<<V<<"\n";}

Compiler output:
a.cc:2:15: error: expected constructor, destructor, or type conversion before '(' token
    2 | int a,v,V;main(A){for(std::cin>>A;std::cin>>a>>v;)(V<v||V==v&&A>a)&&(V=v)&(A=a);std::cout<<A<<" "<<V<<"\n";}
      |               ^
Language: C++

include <iostream>
using namespace std;

int main(void){

  int n;
  int max = 0;
  int num = 0;
  int flag = 0;

  cin >> n;

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

    int a = 0,v = 0;

    cin >> a >> v;

    if( max <= v && flag == 0){
      
      max = v;
      num = a;

      if( v == 0 ) flag = 1;

    }

  }

  cout << num << " " << max << endl;

  return 0;

}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin >> n;
      |   ^~~
a.cc:30:3: error: 'cout' was not declared in this scope
   30 |   cout << num << " " << max << endl;
      |   ^~~~
a.cc:30:32: error: 'endl' was not declared in this scope
   30 |   cout << num << " " << max << endl;
      |                                ^~~~
Language: C++

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

int main(void){
  int n,num,w;
  pair<int,int>;  

  cin >> n;
  for(int i = 0 ; i < n ; i++){
    cin >> num >> w;
    p[num-1].first = num;
    p[num-1].second = w;
  }

  sort(p,p+n);
  cout << p[0].first << ' ' << p[0].second << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: declaration does not declare anything [-fpermissive]
    7 |   pair<int,int>;
      |   ^~~~~~~~~~~~~
a.cc:12:5: error: 'p' was not declared in this scope
   12 |     p[num-1].first = num;
      |     ^
a.cc:16:8: error: 'p' was not declared in this scope
   16 |   sort(p,p+n);
      |        ^
Language: C

#include<stdio.h>
 
 
int main(){
 
  int n, a, b, c, d, cnt, x;
 
  while(scanf("%d", &n) != EOF){
 
    cnt=0;
    for(a=1000;a>=0;a--){
      for(b=n-a;b>=0;b--){
	for(c=n-b;c>=0;c--){
	  for(d=n-c;d>=0;d--){
	    if(a+b+c+d==n){
	      cnt++;
	    }
	  }
	}
      }
    }
 
  printf("%d\n", cnt);
  }
  return 0;

Compiler output:
main.c: In function 'main':
main.c:25:3: error: expected declaration or statement at end of input
   25 |   return 0;
      |   ^~~~~~
Language: C

#include<stdio.h>
int main(void){
   int a, b, c, d, n, key;
   while ( scanf("%d", &n) != EOF ) {
      key = 0;
      for ( a = 0; a <= n; a++) {
         for ( b = a + 1; b <= n; b++) {
            for ( c = b + 1; c <= n; c++ ) {
               for ( d = d + 1; d <= n; d++ ) {
                  if ( n == a + b + c + d ) key++;
               }
            }
         }
      }
      key = key * 26;

      for ( a = 0; a <= n; a++) {
         b = a;
            for ( c = b + 1; c <= n; c++ ) {
               for ( d = c + 1; d <= n; d++ ) {
                  if ( n == a + b + c + d ) key1++;
               }
            }
      }
      key1 = key1 * 6 * 6

      for ( a = 0; a <= n; a++) {
         b = a;
            c = b
               for ( d = c + 1; d <= n; d++ ) {
                  if ( n == a + b + c + d ) key++;
               }
      }
      key2 = key2 * 2 * 8

      for ( a = 0; a <= n; a++) {
         b = a;
            c = b;
               d = c;
                  if ( n == a + b + c + d ) key3++;
      }
      

      printf("%d\n", key + key1 + key2 + key3);
   }
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:45: error: 'key1' undeclared (first use in this function); did you mean 'key'?
   21 |                   if ( n == a + b + c + d ) key1++;
      |                                             ^~~~
      |                                             key
main.c:21:45: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:26: error: expected ';' before 'for'
   25 |       key1 = key1 * 6 * 6
      |                          ^
      |                          ;
   26 | 
   27 |       for ( a = 0; a <= n; a++) {
      |       ~~~
Language: C

#include<stdio.h>
int main(void){
   int a, b, c, d, n, key, key1, key2, key3;
   while ( scanf("%d", &n) != EOF ) {
      key = key1 = key2 = key3 = 0;
      for ( a = 0; a <= n; a++) {
         for ( b = a + 1; b <= n; b++) {
            for ( c = b + 1; c <= n; c++ ) {
               for ( d = d + 1; d <= n; d++ ) {
                  if ( n == a + b + c + d ) key++;
               }
            }
         }
      }
      key = key * 26;

      for ( a = 0; a <= n; a++) {
         b = a;
            for ( c = b + 1; c <= n; c++ ) {
               for ( d = c + 1; d <= n; d++ ) {
                  if ( n == a + b + c + d ) key1++;
               }
            }
      }
      key1 = key1 * 6 * 6;

      for ( a = 0; a <= n; a++) {
         b = a;
            c = b
               for ( d = c + 1; d <= n; d++ ) {
                  if ( n == a + b + c + d ) key++;
               }
      }
      key2 = key2 * 2 * 8;

      for ( a = 0; a <= n; a++) {
         b = a;
            c = b;
               d = c;
                  if ( n == a + b + c + d ) key3++;
      }
      

      printf("%d\n", key + key1 + key2 + key3);
   }
   return 0;

Compiler output:
main.c: In function 'main':
main.c:29:18: error: expected ';' before 'for'
   29 |             c = b
      |                  ^
      |                  ;
   30 |                for ( d = c + 1; d <= n; d++ ) {
      |                ~~~
main.c:46:4: error: expected declaration or statement at end of input
   46 |    return 0;
      |    ^~~~~~
Language: C

include<stdio.h>
main(){
  int a,b,cnt=0,n;
  int ab[2001]={0};
  int abcd[4001]={0};

  for(a=0;a<=1000;a++)for(b=0;b<=1000;b++)ab[a+b]++;
  for(a=0;a<=2000;a++)for(b=0;b<=2000;b++)abcd[a+b]+=ab[a]*ab[b];
 
  while( scanf("%d",&b)!=EOF)
  printf("%d\n",abcd[b]);
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

#include <stdio.h>

int N(int　x){
    return (x+1)*(x+2)*(x+3)/6
}

int main(){
   while(~scanf("%d", &n))
    printf("%lld\n", N[n]);
  return 0;
}

Compiler output:
main.c:3:10: error: stray '\343' in program
    3 | int N(int<U+3000>x){
      |          ^~~~~~~~
main.c: In function 'N':
main.c:4:31: error: expected ';' before '}' token
    4 |     return (x+1)*(x+2)*(x+3)/6
      |                               ^
      |                               ;
    5 | }
      | ~                              
main.c: In function 'main':
main.c:8:24: error: 'n' undeclared (first use in this function)
    8 |    while(~scanf("%d", &n))
      |                        ^
main.c:8:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int N(int　x){
    return (x+1)*(x+2)*(x+3)/6
}

int main(){
    int n,m;
    while(~scanf("%d", &n))
    if (n > 2000)
        n = 4000 - n;
    if (n < 1001)
        printf("%d\n", N(n));
    else
        m = n - 1000
        print("%d\n", N(n)-(N(m)-m+1)/2)
  return 0;
}

Compiler output:
main.c:3:10: error: stray '\343' in program
    3 | int N(int<U+3000>x){
      |          ^~~~~~~~
main.c: In function 'N':
main.c:4:31: error: expected ';' before '}' token
    4 |     return (x+1)*(x+2)*(x+3)/6
      |                               ^
      |                               ;
    5 | }
      | ~                              
main.c: In function 'main':
main.c:15:21: error: expected ';' before 'print'
   15 |         m = n - 1000
      |                     ^
      |                     ;
   16 |         print("%d\n", N(n)-(N(m)-m+1)/2)
      |         ~~~~~
Language: C

#include <stdio.h>

int nn(int　x){
    return (x+1)*(x+2)*(x+3)/6
}

int main(){
    int n,m;
    while(~scanf("%d", &n))
    if (n > 2000)
        n = 4000 - n;
    if (n < 1001)
        printf("%d\n", nn(n));
    else
        m = n - 1000
        print("%d\n", nn(n)-(nn(m)-m+1)/2)
  return 0;
}

Compiler output:
main.c:3:11: error: stray '\343' in program
    3 | int nn(int<U+3000>x){
      |           ^~~~~~~~
main.c: In function 'nn':
main.c:4:31: error: expected ';' before '}' token
    4 |     return (x+1)*(x+2)*(x+3)/6
      |                               ^
      |                               ;
    5 | }
      | ~                              
main.c: In function 'main':
main.c:15:21: error: expected ';' before 'print'
   15 |         m = n - 1000
      |                     ^
      |                     ;
   16 |         print("%d\n", nn(n)-(nn(m)-m+1)/2)
      |         ~~~~~
Language: C++

#include<iostream>

int main(int argc, char const *argv[])
{
    int a;
    while(std::cin >>a){
        int ans=0;
        for(int i=0;i<=1000;i++){
            for(int j=0;j<=1000;j++){
                for(int k=0;k<=1000;k++){
                    for(int l=0;l<=1000;l++){
                        if(a==i+j+k+l) ans++;
                        else if(a<i+j+k+l) break;
                    }
                        else if(a<i+j+k) break;
                }
                        else if(a<i+j) break;
            }
                        else if(a<i) break;
        }
        std::cout << ans << std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:15:25: error: 'else' without a previous 'if'
   15 |                         else if(a<i+j+k) break;
      |                         ^~~~
a.cc:17:25: error: 'else' without a previous 'if'
   17 |                         else if(a<i+j) break;
      |                         ^~~~
a.cc:19:25: error: 'else' without a previous 'if'
   19 |                         else if(a<i) break;
      |                         ^~~~
Language: C++

using namespace std;
int main(){
	int count, num,val[4010], tmp[4010];
	val[0] = 4;
	tmp[0] = 6;
	for (int a = 0; a < 4010; a++){
		tmp[a + 1] = tmp[a] + a + 4;
	}
	for (int a = 0; a < 4010; a++){
		val[a + 1] = val[a] + tmp[a];
	}
	while (cin >> num){
		cout << val[num - 1]<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'cin' was not declared in this scope
   12 |         while (cin >> num){
      |                ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:13:17: error: 'cout' was not declared in this scope
   13 |                 cout << val[num - 1]<<endl;
      |                 ^~~~
a.cc:13:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:39: error: 'endl' was not declared in this scope
   13 |                 cout << val[num - 1]<<endl;
      |                                       ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

import std.stdio;
import std.algorithm;
import std.string;
import std.range;
import std.array;
import std.conv;
import std.complex;
import std.math;


int calc2(int n) {
	if(n <= 1000) {
		return n+1;
	} else {
		return 2000-n+1;
	}
}

void main() {
	while(!stdin.eof()){
		int n = to!int(readln().chomp());
		int sum;
		for(int i = max(0, n-2000); i <= min(n, 2000); ++i) {
			sum += calc2(i)*calc2(n-i);
		}
		writeln(sum);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import std.algorithm;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import std.string;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import std.range;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import std.array;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import std.conv;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import std.complex;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
    8 | import std.math;
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:19:1: error: '::main' must return 'int'
   19 | void main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:20:16: error: 'stdin' was not declared in this scope
   20 |         while(!stdin.eof()){
      |                ^~~~~
a.cc:1:1: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | import std.stdio;
a.cc:21:25: error: 'to' was not declared in this scope
   21 |                 int n = to!int(readln().chomp());
      |                         ^~
a.cc:23:29: error: 'max' was not declared in this scope
   23 |                 for(int i = max(0, n-2000); i <= min(n, 2000); ++i) {
      |                             ^~~
a.cc:23:50: error: 'min' was not declared in this scope; did you mean 'main'?
   23 |                 for(int i = max(0, n-2000); i <= min(n, 2000); ++i) {
      |                                                  ^~~
      |                                                  main
a.cc:26:17: error: 'writeln' was not declared in this scope
   26 |                 writeln(sum);
      |                 ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int n;
int dp[5][4001];

int func(int i,int j){
    if (dp[i][j]>=0) {
        return dp[i][j];
    }
    int res=0;
    if(i==4){
        if (j==n) {
            return 1;;
        }
        else{
            return 0;
        }
    }
    else{
        for (int k=0; k<=n; k++) {
            res+=func(i+1, j+k);
        }
    }
    return dp[i][j]=res;
}

int main(){
    while (cin>>n,n) {
        memset(dp, -1, sizeof(dp));
        cout<<func(0,0)<<endl;
    }
    return 0;
}

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

#include <iostream>
using namespace std;

int n;
int dp[5][4001];

int func(int i,int j){
    if (dp[i][j]>=0) {
        return dp[i][j];
    }
    int res=0;
    if(i==4){
        if (j==n) {
            return 1;;
        }
        else{
            return 0;
        }
    }
    else{
        for (int k=0; k<=n; k++) {
            res+=func(i+1, j+k);
        }
    }
    return dp[i][j]=res;
}

int main(){
    while (cin>>n) {
        memset(dp, -1, sizeof(dp));
        cout<<func(0,0)<<endl;
    }
    return 0;
}

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