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

#include <stdio.h>
int main(void){
	int n,p,P,j[1000],J,n,i,bow,o;
	scanf("%d",&n);
	while(n!=0){
		J=0;
		p=0;
		o=2;
		for(i=1;i<=n;i++){
			scanf("%d",&P);
			p+=P;
		}
		for(i=1;i<=n-1;i++){
			scanf("%d",&j[i]);
			J+=j[i];
		}
		bow=p+J;
		for(i=n-1;i>0;i--){
			J-=j[i];
			if(bow<(J+p)*o){
				bow=(J+p)*o;
			}
			o++;
		}
		printf("%d\n",bow);
		scanf("%d",&n);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:29: error: redeclaration of 'int n'
    3 |         int n,p,P,j[1000],J,n,i,bow,o;
      |                             ^
a.cc:3:13: note: 'int n' previously declared here
    3 |         int n,p,P,j[1000],J,n,i,bow,o;
      |             ^
Language: C++

// 2012 toi5 start 13:15
#include<map>
#include<list>
#include<queue>
#include<stack>
#include<vector>
#include<conio.h>
#include<string.h>
#include<iostream>
#include<functional>
#include<algorithm>
using namespace std;
int main(){
	
	long long n, i, t, sump = 0, sumj = 0, maxv = 0, v;
	while (cin >> n, n){

		long long p[1000], j[1000];
		for (int i = 0; i < n; i++){
			cin >> p[i];
			sump += p[i];
		}
		for (int i = 0; i < n - 1; i++){
			cin >> j[i];
		}
		sort(j, j + n - 1, greater<int>());
		for (i = 0, t = n; t >= 1; t--, i++){//??????????????¬??°????????§??????????????¬??°???
			maxv = t*(sump + sumj);
			sumj += j[i];
			v = max(maxv, v);
		}
		cout << v << endl;
		sump = 0, sumj = 0, maxv = 0;
	}
	return 0;
}

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

#include<map>
#include<list>
#include<queue>
#include<stack>
#include<vector>
#include<conio.h>
#include<string.h>
#include<iostream>
#include<functional>
#include<algorithm>
using namespace std;
int main(){
	
	long long n, i, t, sump = 0, sumj = 0, maxv = 0, v;
	while (cin >> n, n){
		long long p[1001], j[1001];
		for (i = 0; i < n; i++){
			cin >> p[i];
			sump += p[i];
		}
		for (i = 0; i < n - 1; i++){
			cin >> j[i];
		}
		sort(j, j + n - 1, greater<int>());
		for (i = 0, t = n; t >= 1; t--, i++){//??????????????¬??°????????§??????????????¬??°???
			maxv = t*(sump + sumj);
			sumj += j[i];
			v = max(maxv, v);
		}
		cout << v << endl;
		sump = 0, sumj = 0, maxv = 0;
	}
	return 0;
}

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

// 2012 toi5 start 13:15
#include<map>
#include<list>
#include<queue>
#include<stack>
#include<vector>
#include<conio.h>
#include<string.h>
#include<iostream>
#include<functional>
#include<algorithm>
using namespace std;
int main(){
	
	long long n, i, t, sump = 0, sumj = 0, maxv = 0, v;
	while (cin >> n, n){
		long long p[1001], j[1001];
		for (i = 0; i < n; i++){
			cin >> p[i];
			sump += p[i];
		}
		for (i = 0; i < n - 1; i++){
			cin >> j[i];
		}
		sort(j, j + n , greater<int>());
		for (i = 0, t = n; t >= n/2; t--, i++){//??????????????¬??°????????§??????????????¬??°???
			maxv = t*(sump + sumj);
			sumj += j[i];
			v = max(maxv, v);
		}
		cout << v << endl;
		sump = 0, sumj = 0, maxv = 0;
	}
	return 0;
}

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

// 2012 toi5 start 13:15
#include<map>
#include<list>
#include<queue>
#include<stack>
#include<vector>
//#include<conio.h>
#include<string.h>
#include<iostream>
#include<functional>
#include<algorithm>
using namespace std;
int main(){
	
	long long n, i, t, sump = 0, sumj = 0, maxv = 0, v = 0;
	while (cin >> n, n){
		long long p[1001], j[1001];
		for (i = 0; i < n; i++){
			cin >> p[i];
			sump += p[i];
		}
		for (i = 0; i < n - 1; i++){
			cin >> j[i];
		}
		sort(j, j + n , greater<int>());
		for (i = 0, t = n; t >=1 ; t--, i++){//??????????????¬??°????????§??????????????¬??°???
			maxv = max(t*(sump + sumj), t*(sump + sumj + j[i]));
			sumj += j[i];
		}
		cout << maxv << endl;
		sump = 0, sumj = 0, maxv = 0;
	}
	return 0;
}
a
/*#include <iostream>
using namespace std;

template <typename T>
void prt(T outData)
{

	std::cout << outData << endl;

}

template <typename T>
void prtar(T outDataArray[], size_t ArraySize, bool instFlg = false)
{

	for (unsigned int i = 0; i < ArraySize / sizeof(outDataArray[0]); i++) {
		if (instFlg) {
			std::cout << outDataArray[i] << endl;
		}
		else {
			std::cout << "ARRAY[" << i << "] : " << outDataArray[i] << endl;
		}

	}

}

int main()
{

	int A[10];

	for (int i = 0; i < 10; i++) cin >> A[i];

	prtar(A, sizeof(A));

	return 0;

}*/

Compiler output:
a.cc:35:1: error: 'a' does not name a type
   35 | a
      | ^
Language: C++

#include<map>
#include<list>
#include<queue>
#include<stack>
#include<vector>
//#include<conio.h>
#include<string.h>
#include<iostream>
#include<functional>
#include<algorithm>
using namespace std;
typedef long long ll
int main(){
	
	ll n, i, t, sump = 0, sumj = 0, maxv = 0, v = 0;
	while (cin >> n, n){
		int p[1001], j[1001];
		for (i = 0; i < n; i++){
			cin >> p[i];
			sump += p[i];
		}
		for (i = 0; i < n - 1; i++){
			cin >> j[i];
		}
		maxv = sump*n;
		sort(j, j + n , greater<int>());
		for (i = 0, t = n-1; t >=1 ; t--, i++){//??????????????¬??°????????§??????????????¬??°???
			v += j[i];
			maxv = max(t*(sump + v), maxv);
			//cout << t*(sump + v) << "  " << maxv << endl;
		}
		cout << maxv << endl;
		sump = 0, sumj = 0, maxv = 0, v = 0;
	}
	return 0;
}

Compiler output:
a.cc:13:1: error: expected initializer before 'int'
   13 | int main(){
      | ^~~
Language: C++

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

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

void AAA(int,int,int);

int pipe[65001];
int joi[65001]
int kanemax = -1;
int nagasa = 0;
int sosu = 0;
int n;

int main()
{

	cin >> n;
	while( n != 0 ){
		for( int i = 0; i < n; i++ ) {
			cin >> pipe[i];
			nagasa += pipe[i];
		}
		for( int i = 0; i < n - 1; i++ ) {
			cin >> joi[i];
		}
		sosu = n;
		AAA( sosu, nagasa, 0 );

		cout << kanemax << endl;

		nagasa = 0;
		kanemax = 0;

		cin >> n;
	}
	return 0;
}

void AAA( int a, int b, int c )
{
	if( c == n ){
		if( kanemax < b * a ) kanemax = b * a;
	}
	else{

		AAA( a - 1, b + joi[c], c + 1 ); 
		AAA( a, b, c + 1 );
	}
}

Compiler output:
a.cc:11:1: error: expected initializer before 'int'
   11 | int kanemax = -1;
      | ^~~
a.cc: In function 'int main()':
a.cc:26:32: error: 'joi' was not declared in this scope
   26 |                         cin >> joi[i];
      |                                ^~~
a.cc:31:25: error: 'kanemax' was not declared in this scope
   31 |                 cout << kanemax << endl;
      |                         ^~~~~~~
a.cc: In function 'void AAA(int, int, int)':
a.cc:44:21: error: 'kanemax' was not declared in this scope
   44 |                 if( kanemax < b * a ) kanemax = b * a;
      |                     ^~~~~~~
a.cc:48:33: error: 'joi' was not declared in this scope
   48 |                 AAA( a - 1, b + joi[c], c + 1 );
      |                                 ^~~
Language: C++

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

long long kanemax = -1;
long long nagasa = 0;
long long sosu = 0;
int n;

void AAA( long long a, long long b, long long c, long long joi[] )
{
	if( c == n ){
		if( kanemax < b * a ) kanemax = b * a;
	}
	else{

		AAA( a - 1, b + joi[c], c + 1 ); 
		AAA( a, b, c + 1 );
	}
}

int main()
{

	long long pipe[65001], joi[65001];

	cin >> n;
	while( n != 0 ){
		memset( pipe, 0, sizeof( pipe ) );
		memset( joi, 0, sizeof( joi ) );
		for( int i = 0; i < n; i++ ) {
			cin >> pipe[i];
			nagasa += pipe[i];
		}
		for( int i = 0; i < n - 1; i++ ) {
			cin >> joi[i];
		}
		sosu = n;
		AAA( sosu, nagasa, 0, joi );

		cout << kanemax << endl;

		nagasa = 0;
		kanemax = 0;

		cin >> n;
	}
	return 0;
}

Compiler output:
a.cc: In function 'void AAA(long long int, long long int, long long int, long long int*)':
a.cc:18:20: error: too few arguments to function 'void AAA(long long int, long long int, long long int, long long int*)'
   18 |                 AAA( a - 1, b + joi[c], c + 1 );
      |                 ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:11:6: note: declared here
   11 | void AAA( long long a, long long b, long long c, long long joi[] )
      |      ^~~
a.cc:19:20: error: too few arguments to function 'void AAA(long long int, long long int, long long int, long long int*)'
   19 |                 AAA( a, b, c + 1 );
      |                 ~~~^~~~~~~~~~~~~~~
a.cc:11:6: note: declared here
   11 | void AAA( long long a, long long b, long long c, long long joi[] )
      |      ^~~
Language: C++

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

void AAA(int,int,int, int*);

int kanemax=-1;
int nagasa=0;
int sosu=0,n;

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

int main()
{

	int pipe[65001], joi[65002];

	cin>>n;
	while(n!=0){
		REP(i,n){
			cin>>pipe[i];
			nagasa+=pipe[i];
		}
		REP(i,n-1){
			cin>>joi[i];
		}
		sosu=n;
		AAA(sosu,nagasa,0);

		cout<<kanemax<<endl;
		nagasa=0;
		kanemax=0;
		cin>>n;
	}
	return 0;
}
void AAA(int a,int b,int c, int joi[])
{
	if(c==n){
		if(kanemax<b*a) kanemax=b*a;
	}
	else{

		AAA(a-1,b+joi[c],c+1); 
		AAA(a,b,c+1);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:20: error: too few arguments to function 'void AAA(int, int, int, int*)'
   28 |                 AAA(sosu,nagasa,0);
      |                 ~~~^~~~~~~~~~~~~~~
a.cc:5:6: note: declared here
    5 | void AAA(int,int,int, int*);
      |      ^~~
a.cc: In function 'void AAA(int, int, int, int*)':
a.cc:44:20: error: too few arguments to function 'void AAA(int, int, int, int*)'
   44 |                 AAA(a-1,b+joi[c],c+1);
      |                 ~~~^~~~~~~~~~~~~~~~~~
a.cc:37:6: note: declared here
   37 | void AAA(int a,int b,int c, int joi[])
      |      ^~~
a.cc:45:20: error: too few arguments to function 'void AAA(int, int, int, int*)'
   45 |                 AAA(a,b,c+1);
      |                 ~~~^~~~~~~~~
a.cc:37:6: note: declared here
   37 | void AAA(int a,int b,int c, int joi[])
      |      ^~~
Language: C++

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

void solve(int a,int b,int c, int joi[]);

int kanemax=-1;
int nagasa=0;
int sosu=0,n;

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

int main()
{

	int pipe[65001], joi[65002];

	cin>>n;
	while(n!=0){
		REP(i,n){
			cin>>pipe[i];
			nagasa+=pipe[i];
		}
		REP(i,n-1){
			cin>>joi[i];
		}
		sosu=n;
		solve(sosu,nagasa,0);

		cout<<kanemax<<endl;
		nagasa=0;
		kanemax=0;
		cin>>n;
	}
	return 0;
}
void solve(int a,int b,int c, int joi[])
{
	if(c==n){
		if(kanemax<b*a) kanemax=b*a;
	}
	else{

		solve(a-1,b+joi[c],c+1, joi[]); 
		solve(a,b,c+1, joi[]);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:22: error: too few arguments to function 'void solve(int, int, int, int*)'
   28 |                 solve(sosu,nagasa,0);
      |                 ~~~~~^~~~~~~~~~~~~~~
a.cc:5:6: note: declared here
    5 | void solve(int a,int b,int c, int joi[]);
      |      ^~~~~
a.cc: In function 'void solve(int, int, int, int*)':
a.cc:44:45: error: expected primary-expression before ']' token
   44 |                 solve(a-1,b+joi[c],c+1, joi[]);
      |                                             ^
a.cc:45:36: error: expected primary-expression before ']' token
   45 |                 solve(a,b,c+1, joi[]);
      |                                    ^
Language: C++

#include<stdio.h>
int main(void)
{
	long long int n,p,j[70000],sum,x,i,k,max;
	while(1){
		scanf("%lld",&n);
		if(n==0) break;
		sum=0;
		for(i=0;i<n;i++){
			scanf("%lld",&p);
			sum+=p;
		}
		for(i=0;i<n-1;i++){
			scanf("%lld",&j[i]);
		//	printf("i=%d\n",i);
		}
		qsort(j[0],j[n-1]);
		max=0;
		for(i=0;i<n;i++){
			if(max<(n-i)*sum) max=(n-i)*sum;
			else break;
			sum+=j[i];
		}
		printf("%d\n",max);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'qsort' was not declared in this scope
   17 |                 qsort(j[0],j[n-1]);
      |                 ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std; 
lnog long int p[100000],j[100000];
int main(void)
{
	long long int n,sum,sum1,max,cnt,i;
	while(1){
		scanf("%lld",&n);
		if(n==0) break;
		sum=0;
		for(i=0;i<n;i++){
			scanf("%lld",&p[i]);
			sum+=p[i];
		}
		cnt=n; max=sum*cnt;
		for(i=0;i<n-1;i++){
			scanf("%lld",&j[i]);
			j[i]*=-1;
		}
		sort(j,j+n);
		for(i=0;i<n-1;i++) j[i]*=-1;
		for(i=0;i<n-1;i++){
			cnt--;
			sum+=j[i];
			sum1=sum*cnt;
			if(max<sum1) max=sum1;
		//	printf("%d\n",sum1);
		}
		printf("%lld\n",max);
	}
	return 0;
}


Compiler output:
a.cc:3:1: error: 'lnog' does not name a type; did you mean 'long'?
    3 | lnog long int p[100000],j[100000];
      | ^~~~
      | long
a.cc: In function 'int main()':
a.cc:12:39: error: 'p' was not declared in this scope
   12 |                         scanf("%lld",&p[i]);
      |                                       ^
a.cc:17:39: error: 'j' was not declared in this scope
   17 |                         scanf("%lld",&j[i]);
      |                                       ^
a.cc:20:22: error: 'j' was not declared in this scope
   20 |                 sort(j,j+n);
      |                      ^
Language: C++

#include <iostream>
using namespace std;

typedef long long ll;

ll n;
ll a[70000], b[70000];

int main(){
  while(cin >> n, n){
    ll sumA = 0;
    ll sumB = 0;

    for(int i = 0; i < n; i++){
      cin >> a[i];
      sumA += a[i];
    }
    for(int i = 0; i < n - 1; i++){
      cin >> b[i];
      sumB += b[i];
    }
    sort(b, b + (n - 1));

    ll ans = 0;

    for(int i = 1; i <= n; i++){
      ans = max(ans, i * (sumA + sumB));
      sumB -= b[i - 1];
    }
    cout << ans << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   22 |     sort(b, b + (n - 1));
      |     ^~~~
      |     short
Language: C++

#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
	int n;
	while(scanf("%d",&n),n){
		int p[10000]={0};
		long long int x = 0;
		long long int y = 0;
		long long int ans = 0;
		for(int i = 0; i < n; i++){
			scanf("%d",&p[i]);
			y += p[i];
		}
		sort(p,p+n);
		int j[10000]={0};
		for(int i = 0; i < n-1; i++){
			scanf("%d",&j[i]);
			x += j[i];
		}
		sort(j,j+n-1);
		x += y;
		int cnt = 1;
		ans = x;
		while(1){
			cnt++;
			if(cnt == n)break;
			for(int i = 0; i < n-1; i++){
				if(p[i] != -1){
					p[i] = -1;
					x -= j[i];
					break;
				}
			}
			if(ans > x*cnt){
				break;
			}
			ans = x*cnt;
		}
		ans = max(ans,y*n);
		printf("%lld\n",ans);
	}
	return 0;
}
		#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
	int n;
	while(scanf("%d",&n),n){
		int p[10000]={0};
		long long int x = 0;
		long long int y = 0;
		long long int ans = 0;
		for(int i = 0; i < n; i++){
			scanf("%d",&p[i]);
			y += p[i];
		}
		sort(p,p+n);
		int j[10000]={0};
		for(int i = 0; i < n-1; i++){
			scanf("%d",&j[i]);
			x += j[i];
		}
		sort(j,j+n-1);
		x += y;
		int cnt = 1;
		ans = x;
		while(1){
			cnt++;
			if(cnt == n)break;
			for(int i = 0; i < n-1; i++){
				if(p[i] != -1){
					p[i] = -1;
					x -= j[i];
					break;
				}
			}
			if(ans > x*cnt){
				break;
			}
			ans = x*cnt;
		}
		ans = max(ans,y*n);
		printf("%lld\n",ans);
	}
	return 0;
}
		

Compiler output:
a.cc:48:5: error: redefinition of 'int main()'
   48 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
Language: C++

#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
	int n;
	while(scanf("%d",&n),n){
		int p[10000]={0};
		long long int x = 0;
		long long int y = 0;
		long long int ans = 0;
		for(int i = 0; i < n; i++){
			scanf("%d",&p[i]);
			y += p[i];
		}
		sort(p,p+n);
		int j[10000]={0};
		for(int i = 0; i < n-1; i++){
			scanf("%d",&j[i]);
			x += j[i];
		}
		sort(j,j+n-1);
		x += y;
		int cnt = 1;
		ans = x;
		while(1){
			cnt++;
			if(cnt == n)break;
			for(int i = 0; i < n-1; i++){
				if(p[i] != -1){
					p[i] = -1;
					x -= j[i];
					break;
				}
			}
			if(ans > x*cnt){
				break;
			}
			ans = x*cnt;
		}
		ans = max(ans,y*n);
		printf("%lld\n",ans);
	}
	return 0;
}
		#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
	int n;
	while(scanf("%d",&n),n){
		int p[10000]={0};
		long long int x = 0;
		long long int y = 0;
		long long int ans = 0;
		for(int i = 0; i < n; i++){
			scanf("%d",&p[i]);
			y += p[i];
		}
		sort(p,p+n);
		int j[10000]={0};
		for(int i = 0; i < n-1; i++){
			scanf("%d",&j[i]);
			x += j[i];
		}
		sort(j,j+n-1);
		x += y;
		int cnt = 1;
		ans = x;
		while(1){
			cnt++;
			if(cnt == n)break;
			for(int i = 0; i < n-1; i++){
				if(p[i] != -1){
					p[i] = -1;
					x -= j[i];
					break;
				}
			}
			if(ans > x*cnt){
				break;
			}
			ans = x*cnt;
		}
		ans = max(ans,y*n);
		printf("%d\n",ans);
	}
	return 0;
}
		

Compiler output:
a.cc:48:5: error: redefinition of 'int main()'
   48 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
Language: C++

#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
	long long int n;
	while(scanf("%d",&n),n){
		long long int p[10000]={0};
		long long int x = 0;
		long long int y = 0;
		long long int ans = 0;
		for(long long int i = 0; i < n; i++){
			scanf("%d",&p[i]);
			y += p[i];
		}
		sort(p,p+n);
		long long int j[10000]={0};
		for(long long int i = 0; i < n-1; i++){
			scanf("%d",&j[i]);
			x += j[i];
		}
		sort(j,j+n-1);
		x += y;
		long long int cnt = 1;
		ans = x;
		while(1){
			cnt++;
			if(cnt == n)break;
			for(long long int i = 0; i < n-1; i++){
				if(p[i] != -1){
					p[i] = -1;
					x -= j[i];
					break;
				}
			}
			if(ans > x*cnt){
				break;
			}
			ans = x*cnt;
		}
		ans = max(ans,y*n);
		printf("%d\n",ans);
	}
	return 0;
}
		#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
	long long int n;
	while(scanf("%d",&n),n){
		long long int p[10000]={0};
		long long int x = 0;
		long long int y = 0;
		long long int ans = 0;
		for(long long int i = 0; i < n; i++){
			scanf("%d",&p[i]);
			y += p[i];
		}
		sort(p,p+n);
		long long int j[10000]={0};
		for(long long int i = 0; i < n-1; i++){
			scanf("%d",&j[i]);
			x += j[i];
		}
		sort(j,j+n-1);
		x += y;
		long long int cnt = 1;
		ans = x;
		while(1){
			cnt++;
			if(cnt == n)break;
			for(long long int i = 0; i < n-1; i++){
				if(p[i] != -1){
					p[i] = -1;
					x -= j[i];
					break;
				}
			}
			if(ans > x*cnt){
				break;
			}
			ans = x*cnt;
		}
		ans = max(ans,y*n);
		printf("%d\n",ans);
	}
	return 0;
}
		

Compiler output:
a.cc:48:5: error: redefinition of 'int main()'
   48 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
Language: C++

#include<cstdio>
#include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	long long n,a;
	while(cin >> n,n){
		long long int p = 0;
		vector<long long> J(n-1);
		for(int i = 0; i < n; i++){
			cin >> a;
			p += a;
		}
		int ans = p * n;
		for(int i = 1; i < n; i++){
			cin >> J[i-1];
		}
		sort(J.begin(),J.end());
		for(int i = n - 1; i >= 1; i--){
			p += J[i-1];
			ans = max(ans,p * i);
		}
		cout << ans << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:34: error: no matching function for call to 'max(int&, long long int)'
   22 |                         ans = max(ans,p * i);
      |                               ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/vector:62,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:22:34: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   22 |                         ans = max(ans,p * i);
      |                               ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:22:34: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   22 |                         ans = max(ans,p * i);
      |                               ~~~^~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int n,a,c,honsu,tp,tj,mx;
int p[65000];
int j[1001];
void syokika(){
  tp=0;
  tj=0;
  mx=0;
  c=0;
}
int main(){
  while(true){
    cin>>n;
    if(n==0)break;
    syokika();
    for(int i=0;i<n;i++){
      cin>>p[i];
      tp+=p[i];
    }
    for(int i=0;i<n-1;i++){
      cin>>j[i];
      tj+=j[i];
    }
    sort(j,j+n-1);
    for(int i=0;i<n-1;i++){
      cout<<j[i]<<endl;
    }
    for(int i=1;i<=n;i++){
      a=i*(tp+tj);
      if(mx<a)mx=a;
      tj-=j[c];
      c++;
      
    }
    cout<<mx<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   25 |     sort(j,j+n-1);
      |     ^~~~
      |     short
Language: C++

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

int main(void)
{
	int f1, n, p, cnt, *J;
	unsigned int k, sum, max;

	while( scanf("%d", &n) && n > 0)
	{	
		J = new int [n - 1];
		sum = 0;
		cnt = 1;
		for(f1 = 0; f1 < n; f1++)
		{
			scanf("%d", &p);
			sum += p;
		}
		for(f1 = 0; f1 < n-1; f1++)
		{
			scanf("%d", &p);
			sum += p;
			J[f1] = p;
			J.push_back(p);
		}

		max = sum;
		sort(J, J + (n - 1)); //平均O(nlogn)
		for(f1 = 0; f1 < n - 1; f1++)
		{
			sum -= J[f1];
			k = ++cnt * sum;

			if(k > max)
				max = k;
			t++;
		}
		printf("%u\n", max);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:27: error: request for member 'push_back' in 'J', which is of non-class type 'int*'
   26 |                         J.push_back(p);
      |                           ^~~~~~~~~
a.cc:38:25: error: 't' was not declared in this scope
   38 |                         t++;
      |                         ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
static const int MAX = 65000;
typedef long long llong;

main(){
  llong n, totalp;
  llong P[MAX], J[MAX];
  int tcase = 0;
  while(1){
    cin >> n;
    if ( n == 0 ) break;
    tcase++;
    totalp = 0;
    for ( int i = 0; i < n; i++ ) {
      cin >> P[i];
      totalp += P[i];
    }
    for ( int i = 0; i < n-1; i++ ) {
      cin >> J[i];
    }

    llong maxv = 0;
    sort(J, J+(n-1));
    reverse(J, J+(n-1));

    for ( llong j = 0, t = n, totalj = 0; t >= 1; t--, j++ ){
      llong v = t*(totalj + totalp);
      totalj += J[j];
      maxv = max(v, maxv);
    }
    cout << maxv << endl;
  }

  assert( tcase <= 100 );
}

Compiler output:
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:36:3: error: 'assert' was not declared in this scope
   36 |   assert( tcase <= 100 );
      |   ^~~~~~
a.cc:3:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
    2 | #include<algorithm>
  +++ |+#include <cassert>
    3 | using namespace std;
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
static const int MAX = 65000;
typedef long long llong;

main(){
  llong n, totalp;
  llong P[MAX], J[MAX];
  int tcase = 0;
  while(1){
    cin >> n;
    if ( n == 0 ) break;
    tcase++;
    totalp = 0;
    for ( int i = 0; i < n; i++ ) {
      cin >> P[i];
      totalp += P[i];
    }
    for ( int i = 0; i < n-1; i++ ) {
      cin >> J[i];
    }

    llong maxv = 0;
    sort(J, J+(n-1));
    reverse(J, J+(n-1));
    totalj = 0;
    for ( llong j = 0, t = n; t >= 1; t--, j++ ){
      llong v = t*(totalj + totalp);
      totalj += J[j];
      maxv = max(v, maxv);
    }
    cout << maxv << endl;
  }
}

Compiler output:
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:27:5: error: 'totalj' was not declared in this scope; did you mean 'totalp'?
   27 |     totalj = 0;
      |     ^~~~~~
      |     totalp
Language: C++

#include <iostream>
#include <algorithm>
 
int main()
{
    std::vector<int> data;
        int ddata;
        int num;
        int maxvul;
        int count,length;
        std::cin>>num;
        while(num){
                data.resize(num-1);
                maxvul=0;
                for(int i=0;i<num;i++){
                        std::cin>>ddata;
                        maxvul+=ddata;
                }
                ddata=maxvul;
                maxvul*=num;
                for(int i=0;i<num-1;i++){
                        std::cin>>data[i];
                }
                std::sort(data.begin(),data.end(),std::greater<int>());
                
                for(int i=0;i<data.size();i++){
                        ddata+=data[i];
                        if(maxvul<ddata*(num-i-1)){
                                maxvul=ddata*(num-i-1);
                        }
                }
                std::cout<<maxvul<<std::endl;
                std::cin>>num;
        }
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'vector' is not a member of 'std'
    6 |     std::vector<int> data;
      |          ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | 
a.cc:6:17: error: expected primary-expression before 'int'
    6 |     std::vector<int> data;
      |                 ^~~
a.cc:13:17: error: 'data' was not declared in this scope; did you mean 'std::data'?
   13 |                 data.resize(num-1);
      |                 ^~~~
      |                 std::data
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: 'std::data' declared here
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>

int main()
{
    std::vector<int> data;
	int ddata;
	int num;
	int maxvul;
	int count,length;
	std::cin>>num;
	while(num){
		data.resize(num-1);
		maxvul=0;
		for(int i=0;i<num;i++){
			std::cin>>ddata;
			maxvul+=ddata;
		}
		ddata=maxvul;
		maxvul*=num;
		for(int i=0;i<num-1;i++){
			std::cin>>data[i];
		}
		std::sort(data.begin(),data.end(),std::greater<int>());
		
		for(int i=0;i<data.size();i++){
			ddata+=data[i];
			if(maxvul<ddata*(num-i-1)){
				maxvul=ddata*(num-i-1);
			}
		}
		std::cout<<maxvul<<std::endl;
		std::cin>>num;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'vector' is not a member of 'std'
    6 |     std::vector<int> data;
      |          ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | 
a.cc:6:17: error: expected primary-expression before 'int'
    6 |     std::vector<int> data;
      |                 ^~~
a.cc:13:17: error: 'data' was not declared in this scope; did you mean 'std::data'?
   13 |                 data.resize(num-1);
      |                 ^~~~
      |                 std::data
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: 'std::data' declared here
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
Language: C++

#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cstdlib>

using namespace std;

inline int to_int(string s) {int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string to_str(T x) {ostringstream sout; sout << x; return sout.str();}

typedef long long ll;

int main()
{
	int n;
	while(cin >> n, n)
	{
		vector<int> J;
		int mx = 0, a;
		int pipe = 0;
		for(int i = 0; i < n; i++)
		{
			pipe += a;
		}
		for(int i = 0; i < n-1; i++)
		{
			cin >> a; J.push_back(a);
		}

		sort(J.begin(), J.end(), greater<int>());

		for(int i = 0; i <= J.size(); i++)
		{
			int sum = pipe;
			for(int j = 0; j < i; j++)
			{
				sum += J[j];
			}
			sum *= (P.size() - i);

			mx = max(mx, sum);
		}

		cout << mx << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:33: error: 'P' was not declared in this scope
   53 |                         sum *= (P.size() - i);
      |                                 ^
Language: C

#include<iostream>
#include<string.h>
#include<stdlib.h>
#include<time.h>
#include<stdio.h>
using namespace std;
struct tm T;
struct tm *a;
int maya[5]={144000,7200,360,20,1};
int sugi[5]={1,20,20,18,20};
int main(){
	if(sizeof(time_t)!=8)exit(1);
	time_t tt,kin,ans,s=1356015600;
		char koyomi[50];
	 int i,j;
	int  n[5]={0};
	while(1){
		cin>>koyomi;
		if(koyomi[0]=='#'){
			break;
		}
		memset(n,0,sizeof(n));
		j=0;
		cout<<strlen(koyomi)<<endl;
		for(i=0;i<strlen(koyomi);i++){
			if(koyomi[i]=='.'){
				j++;
			}
		}
		cout<<j<<endl;
		if(j==2){
			sscanf(koyomi,"%d.%d.%d",&n[0],&n[1],&n[2]);
			T.tm_year=n[0]-1900;
			T.tm_mon=n[1]-1;
			T.tm_mday=n[2];
			tt=(mktime(&T)-s)/86400%1872000;
			//cout<<tt<<endl;
			printf("%d.%d.%d.%d.%d\n",tt/144000,tt/7200%20,tt/360%20,tt/20%18,tt%20);
		}
		else{
			sscanf(koyomi,"%d.%d.%d.%d.%d",&n[0],&n[1],&n[2],&n[3],&n[4]);
			tt=(n[0]*144000+n[1]*7200+n[2]*360+n[3]*20+n[4])*86400+s;
			a=localtime(&tt);
			printf("%d.%d.%d\n",a->tm_year+1900,a->tm_mon+1,a->tm_mday);
		}
	}
	return 0;
	exit(0);
}

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

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;

ll gettime64(ll y,ll m,ll d){
  struct tm poi;
  poi.tm_year = y-1900;
  poi.tm_mon = m-1;
  poi.tm_mday = d;
  poi.tm_hour = poi.tm_min = poi.tm_sec = 0;
  poi.tm_isdst = -1;
  return _mktime64(&poi);
}

int toint(string s){
  return atoi(s.c_str());
}

vi split(string base, char spl){
  vi result;
  string::size_type pos = 0;
  string::size_type bef = 0;
  base += spl;
  while( (pos = base.find_first_of(spl,bef)) != string::npos ){
    result.push_back(toint(base.substr(bef,pos-bef)));
    bef = pos+1;
  }
  return result;
}

#define AD 146097
#define MAYA 1872000

int main(){
  while(true){
    string s;
    cin>>s;
    if(s=="#")break;
    vi input = split(s,'.');
    if(input.size()==3){
      // yyyy.mm.dd
      ll y = input[0];
      ll m = input[1];
      ll d = input[2];
      ll year_down = (y - 2013)/400;
      y -= year_down*400;
      ll birth = gettime64(y,m,d);
      ll origin = gettime64(2012,12,21);
      ll sub = (birth-origin)/24/60/60;
      sub += year_down*AD%MAYA;
      sub %= MAYA;
      int ki = sub%20; sub/=20;
      int w = sub%18;  sub/=18;
      int t = sub%20;  sub/=20;
      int ka = sub%20;
      int b = sub/20;
      printf("%d.%d.%d.%d.%d\n",b,ka,t,w,ki);
    }else{
      // b.ka.t.w.ki
      ll val = 0;
      val += input[0];  val *= 20;
      val += input[1];  val *= 20;
      val += input[2];  val *= 18;
      val += input[3];  val *= 20;
      val += input[4];
      ll year_add = val/AD;
      val %= AD;
      val *= 24*60*60;
      val += gettime64(2012,12,21);
      struct tm *birth = _gmtime64((__time64_t*)&val);
      int year = birth->tm_year + 1900 + year_add*400;
      int month = birth->tm_mon + 1;
      int day = birth->tm_mday + 1;
      printf("%d.%d.%d\n",year,month,day);
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'll gettime64(ll, ll, ll)':
a.cc:15:10: error: '_mktime64' was not declared in this scope; did you mean 'mktime'?
   15 |   return _mktime64(&poi);
      |          ^~~~~~~~~
      |          mktime
a.cc: In function 'int main()':
a.cc:73:37: error: '__time64_t' was not declared in this scope; did you mean '__timer_t'?
   73 |       struct tm *birth = _gmtime64((__time64_t*)&val);
      |                                     ^~~~~~~~~~
      |                                     __timer_t
a.cc:73:48: error: expected primary-expression before ')' token
   73 |       struct tm *birth = _gmtime64((__time64_t*)&val);
      |                                                ^
a.cc:73:26: error: '_gmtime64' was not declared in this scope; did you mean 'gmtime_r'?
   73 |       struct tm *birth = _gmtime64((__time64_t*)&val);
      |                          ^~~~~~~~~
      |                          gmtime_r
Language: C++

#include <bits/stdc++.h>
#include <time.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;

ll gettime64(ll y,ll m,ll d){
  struct tm poi;
  poi.tm_year = y-1900;
  poi.tm_mon = m-1;
  poi.tm_mday = d;
  poi.tm_hour = poi.tm_min = poi.tm_sec = 0;
  poi.tm_isdst = -1;
  return _mktime64(&poi);
}

int toint(string s){
  return atoi(s.c_str());
}

vi split(string base, char spl){
  vi result;
  string::size_type pos = 0;
  string::size_type bef = 0;
  base += spl;
  while( (pos = base.find_first_of(spl,bef)) != string::npos ){
    result.push_back(toint(base.substr(bef,pos-bef)));
    bef = pos+1;
  }
  return result;
}

#define AD 146097
#define MAYA 1872000

int main(){
  while(true){
    string s;
    cin>>s;
    if(s=="#")break;
    vi input = split(s,'.');
    if(input.size()==3){
      // yyyy.mm.dd
      ll y = input[0];
      ll m = input[1];
      ll d = input[2];
      ll year_down = (y - 2013)/400;
      y -= year_down*400;
      ll birth = gettime64(y,m,d);
      ll origin = gettime64(2012,12,21);
      ll sub = (birth-origin)/24/60/60;
      sub += year_down*AD%MAYA;
      sub %= MAYA;
      int ki = sub%20; sub/=20;
      int w = sub%18;  sub/=18;
      int t = sub%20;  sub/=20;
      int ka = sub%20;
      int b = sub/20;
      printf("%d.%d.%d.%d.%d\n",b,ka,t,w,ki);
    }else{
      // b.ka.t.w.ki
      ll val = 0;
      val += input[0];  val *= 20;
      val += input[1];  val *= 20;
      val += input[2];  val *= 18;
      val += input[3];  val *= 20;
      val += input[4];
      ll year_add = val/AD;
      val %= AD;
      val *= 24*60*60;
      val += gettime64(2012,12,21);
      struct tm *birth = _gmtime64((__time64_t*)&val);
      int year = birth->tm_year + 1900 + year_add*400;
      int month = birth->tm_mon + 1;
      int day = birth->tm_mday + 1;
      printf("%d.%d.%d\n",year,month,day);
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'll gettime64(ll, ll, ll)':
a.cc:16:10: error: '_mktime64' was not declared in this scope; did you mean 'mktime'?
   16 |   return _mktime64(&poi);
      |          ^~~~~~~~~
      |          mktime
a.cc: In function 'int main()':
a.cc:74:37: error: '__time64_t' was not declared in this scope; did you mean '__timer_t'?
   74 |       struct tm *birth = _gmtime64((__time64_t*)&val);
      |                                     ^~~~~~~~~~
      |                                     __timer_t
a.cc:74:48: error: expected primary-expression before ')' token
   74 |       struct tm *birth = _gmtime64((__time64_t*)&val);
      |                                                ^
a.cc:74:26: error: '_gmtime64' was not declared in this scope; did you mean 'gmtime_r'?
   74 |       struct tm *birth = _gmtime64((__time64_t*)&val);
      |                          ^~~~~~~~~
      |                          gmtime_r
Language: C++

#include <bits/stdc++.h>
#include <time.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;

ll gettime64(ll y,ll m,ll d){
  struct tm poi;
  poi.tm_year = y-1900;
  poi.tm_mon = m-1;
  poi.tm_mday = d;
  poi.tm_hour = poi.tm_min = poi.tm_sec = 0;
  poi.tm_isdst = -1;
  return mktime(&poi);
}

int toint(string s){
  return atoi(s.c_str());
}

vi split(string base, char spl){
  vi result;
  string::size_type pos = 0;
  string::size_type bef = 0;
  base += spl;
  while( (pos = base.find_first_of(spl,bef)) != string::npos ){
    result.push_back(toint(base.substr(bef,pos-bef)));
    bef = pos+1;
  }
  return result;
}

#define AD 146097
#define MAYA 1872000

int main(){
  while(true){
    string s;
    cin>>s;
    if(s=="#")break;
    vi input = split(s,'.');
    if(input.size()==3){
      // yyyy.mm.dd
      ll y = input[0];
      ll m = input[1];
      ll d = input[2];
      ll year_down = (y - 2013)/400;
      y -= year_down*400;
      ll birth = gettime64(y,m,d);
      ll origin = gettime64(2012,12,21);
      ll sub = (birth-origin)/24/60/60;
      sub += year_down*AD%MAYA;
      sub %= MAYA;
      int ki = sub%20; sub/=20;
      int w = sub%18;  sub/=18;
      int t = sub%20;  sub/=20;
      int ka = sub%20;
      int b = sub/20;
      printf("%d.%d.%d.%d.%d\n",b,ka,t,w,ki);
    }else{
      // b.ka.t.w.ki
      ll val = 0;
      val += input[0];  val *= 20;
      val += input[1];  val *= 20;
      val += input[2];  val *= 18;
      val += input[3];  val *= 20;
      val += input[4];
      ll year_add = val/AD;
      val %= AD;
      val *= 24*60*60;
      val += gettime64(2012,12,21);
      struct tm *birth = gmtime(&val);
      int year = birth->tm_year + 1900 + year_add*400;
      int month = birth->tm_mon + 1;
      int day = birth->tm_mday + 1;
      printf("%d.%d.%d\n",year,month,day);
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:74:33: error: invalid conversion from 'll*' {aka 'long long int*'} to 'const time_t*' {aka 'const long int*'} [-fpermissive]
   74 |       struct tm *birth = gmtime(&val);
      |                                 ^~~~
      |                                 |
      |                                 ll* {aka long long int*}
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/streambuf:43,
                 from /usr/include/c++/14/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/14/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54,
                 from a.cc:1:
/usr/include/time.h:132:41: note:   initializing argument 1 of 'tm* gmtime(const time_t*)'
  132 | extern struct tm *gmtime (const time_t *__timer) __THROW;
      |                           ~~~~~~~~~~~~~~^~~~~~~
Language: C++

#include<iostream>
#include<string.h>
#include<stdlib.h>
#include<time.h>
#include<stdio.h>
using namespace std;
struct tm T;
struct tm *a;
int maya[5]={144000,7200,360,20,1};
int sugi[5]={1,20,20,18,20};
int main(){
	time_t tt,kin,ans,s=1356015600;
		char koyomi[50];
	 int i,j;
	int  n[5]={0};
	while(1){
		cin>>koyomi;
		if(koyomi[0]=='#'){
			break;
		}
		memset(n,0,sizeof(n));
		j=0;
		cout<<strlen(koyomi)<<endl;
		for(i=0;i<strlen(koyomi);i++){
			if(koyomi[i]=='.'){
				j++;
			}
		}
		cout<<j<<endl;
		if(j==2){
			sscanf(koyomi,"%d.%d.%d",&n[0],&n[1],&n[2]);
			T.tm_year=n[0]-1900;
			T.tm_mon=n[1]-1;
			T.tm_mday=n[2];
			tt=(mktime(&T)-s)/86400%1872000;
			//cout<<tt<<endl;
			printf("%11d.%11d.%11d.%11d.%11d\n",tt/144000,tt/7200%20,tt/360%20,tt/20%18,tt%20);
		}
		else{
			sscanf(koyomi,"%d.%d.%d.%d.%d",&n[0],&n[1],&n[2],&n[3],&n[4]);
			tt=(n[0]*144000+n[1]*7200+n[2]*360+n[3]*20+n[4])*86400+s;
			localtime_r(&tt,&T);
			printf("%d.%d.%d\n",T.tm_year+1900,T.tm_mon+1,T.tm_mday);
	}
	return 0;
}

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

#include <stdio.h>
#include <ctype.h>
 
char *gets(char *);
char buf[100], *p;
 
int getInt(void)
{
    int n = 0;
    while (isspace(*p) || *p == '.') p++;
    if (!*p) return -1;
    while (isdigit(*p)) n = 10 * n + (*p++ - '0');
    return n;
}
 
#define MAGIC 2456283       // 2012.12.21
 
long long greg2jd(int year, int month, int day)
{
    long long a, y, m;
    long long j;
 
    a = (14 - month) / 12;
    y = year + 4800 - a;
    m = month + 12 * a - 3;
    j = day + (153 * m + 2) / 5 + 365 * y + y / 4 - y / 100 + y / 400 - 32045;
    return j;
}
 
int jd2greg(int *year, int *month, int *day, int jd)
{
    int a, b, c;
    int d, e, m;
    int yy;
    int m1;
 
    a = jd + 32044;
    b = (4 * a + 3) / 146097;
    c = a - (146097 * b) / 4;
    d = (4 * c + 3) / 1461;
    e = c - (1461 * d) / 4;
    m = (5 * e + 2) / 153;
    m1 = m / 10;
    *day = e - (153 * m + 2) / 5 + 1;
    *month = m + 3 - 12 * m1;
    yy = 100 * b + d - 4800 + m1;
    if (yy <= 0) { *year = -yy + 1; return -1; }
    *year = yy; return 1;
}
 
int main()
{
    int b, ka, t, w, ki;
    int y, m, d;
    int a, k;
    long long x;
 
    while (1) {
        gets(p = buf);
        if (*p == '#') break;
        y = getInt(), m = getInt(), d = getInt(), a = getInt();
        if (a >= 0) {  // maya -> Gregorian
            b = y, ka = m, t = d, w = a, ki = getInt();
            k = (((20 * b + ka) * 20 + t) * 18 + w) * 20 + ki;
            k += MAGIC;
            jd2greg(&y, &m, &d, k);
            printf("%d.%d.%d\n", y, m, d);
        }
        else {
            x = (greg2jd(y, m, d) - MAGIC) % 1872000;
            k = (int)x;
            b = k / 144000, k %= 144000;
            ka = k / 7200, k %= 7200;
            t = k / 360, k %= 360;
            w = k / 20, ki = k % 20;
            printf("%d.%d.%d.%d.%d\n", b, ka, t, w, ki);
        }
    }
    return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccmmUhOM.o: in function `main':
a.cc:(.text+0x398): undefined reference to `gets(char*)'
collect2: error: ld returned 1 exit status
Language: C++

#include <stdio.h>
#include <ctype.h>
 
char *gets(char *);
char buf[100], *p;
 
int getInt(void)
{
    int n = 0;
    while (isspace(*p) || *p == '.') p++;
    if (!*p) return -1;
    while (isdigit(*p)) n = 10 * n + (*p++ - '0');
    return n;
}
 
#define MAGIC 2456283       // 2012.12.21
 
long long greg2jd(int year, int month, int day)
{
    long long a, y, m;
    long long j;
 
    a = (14 - month) / 12;
    y = year + 4800 - a;
    m = month + 12 * a - 3;
    j = day + (153 * m + 2) / 5 + 365 * y + y / 4 - y / 100 + y / 400 - 32045;
    return j;
}
 
int jd2greg(int *year, int *month, int *day, int jd)
{
    int a, b, c;
    int d, e, m;
    int yy;
    int m1;
 
    a = jd + 32044;
    b = (4 * a + 3) / 146097;
    c = a - (146097 * b) / 4;
    d = (4 * c + 3) / 1461;
    e = c - (1461 * d) / 4;
    m = (5 * e + 2) / 153;
    m1 = m / 10;
    *day = e - (153 * m + 2) / 5 + 1;
    *month = m + 3 - 12 * m1;
    yy = 100 * b + d - 4800 + m1;
    if (yy <= 0) { *year = -yy + 1; return -1; }
    *year = yy; return 1;
}
 
int main()
{
    int b, ka, t, w, ki;
    int y, m, d;
    int a, k;
    long long x;
 
    while (1) {
        gets(p = buf);
        if (*p == '#') break;
        y = getInt(), m = getInt(), d = getInt(), a = getInt();
        if (a >= 0) {  // maya -> Gregorian
            b = y, ka = m, t = d, w = a, ki = getInt();
            k = (((20 * b + ka) * 20 + t) * 18 + w) * 20 + ki;
            k += MAGIC;
            jd2greg(&y, &m, &d, k);
            printf("%d.%d.%d\n", y, m, d);
        }
        else {
            x = (greg2jd(y, m, d) - MAGIC) % 1872000;
            k = (int)x;
            b = k / 144000, k %= 144000;
            ka = k / 7200, k %= 7200;
            t = k / 360, k %= 360;
            w = k / 20, ki = k % 20;
            printf("%d.%d.%d.%d.%d\n", b, ka, t, w, ki);
        }
    }
    return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccIeUlRE.o: in function `main':
a.cc:(.text+0x398): undefined reference to `gets(char*)'
collect2: error: ld returned 1 exit status
Language: Java

import java.io.BufferedReader;

public class Main {
	
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		
		while(true){
			final int max =sc.nextInt();
			
			if(max == 0){
				break;
			}
			
			final int n = sc.nextInt();
			final int size = n + 2;
			
			int[] map = new int[size];
			for(int i = 1; i <= n; i++){
				map[i] = sc.nextInt();
			}
			
			//int[][] adj = new int[size][max];
			boolean[][] adj = new boolean[size][size];
			for(int i = 0; i < size; i++){
				for(int j = 0; j < max; j++){
					if(i == size - 1){
						adj[i][i] = true;
						continue;
					}
					final int num = j + 1;
					final int to = Math.min(size - 1, Math.max(0, i + num));
					final int dist = Math.min(size - 1, Math.max(0, to + map[to]));
					
					adj[i][dist] = true;
				}
			}
			
			for(int k = 0; k < size; k++){
				for(int i = 0; i < size; i++){
					for(int j = 0; j < size; j++){
						adj[i][j] = adj[i][j] || (adj[i][k] && adj[k][j]);
					}
				}
			}
			
			boolean flag = true;
			for(int i = 0; i < size; i++){
				//System.out.print(i + " ");
				//System.out.print(adj[0][i] + " ");
				//System.out.println(adj[i][size-1]);
				
				if(adj[0][i] && !adj[i][size-1]){
					System.out.println("NG");
					flag = false;
					break;
				}
			}
			
			if(flag){
				System.out.println("OK");
			}
		}
	}

}

Compiler output:
Main.java:5: error: cannot find symbol
	public static void main(String[] args) throws IOException {
	                                              ^
  symbol:   class IOException
  location: class Main
Main.java:6: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
3 errors