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

#include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#include<map>
using namespace std;
int V,R;

double EPS=1e-10;
double add(double a,double b){
	if(abs(a+b)<EPS*(abs(a)+abs(b)))return 0;
	return a+b;
}

struct P{
double x,y;
P(){x=0;y=0;}
P(double x,double y):x(x),y(y){}

P operator +(P p){
	return P(add(x,p.x),add(y,p.y));
}

bool operator ==(P p){
	return p.x==x&&p.y==y;
}

P operator -(P p){
	return P(add(x,-p.x),add(y,-p.y));
}

double det(P p){
	return add(x*p.y,-y*p.x);
}

};

P table[1000];
double edge[101][101];
bool cmp_x(const P& p,const P& q){
	if(p.x!=q.x)return p.x<q.x;
	return p.y<q.y;
}

double dist(P p,P q){
	return sqrt((p.x-q.x)*(p.x-q.x)+(p.y-q.y)*(p.y-q.y));
}
vector<P> convex_hull(P* pps,int n){



	//sort(ps,ps+n,cmp_x);

	P ps[1000];
	
	for(int i=0;i<n;i++)ps[i]=pps[i];
	int k=0;
	vector<P>qs(n*2);
	
	sort(ps,ps+n,cmp_x);

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

		while(true){
			if(k<=1)break;
			if((qs[k-1]-qs[k-2]).det(ps[i]-qs[k-1])>0)break;
			k--;
		}
		
			qs[k++]=ps[i];
	}

		for(int i=n-2,t=k;i>=0;i--){
		while(true){
			if(k<=t)break;
			if((qs[k-1]-qs[k-2]).det(ps[i]-qs[k-1])>0)break;
			k--;

		}
			qs[k++]=ps[i];
	}
	qs.resize(k-1);
	return qs;
}

bool used[1000];
int main(){
	
	cin>>V>>R;
	for(int i=0;i<V;i++){
		cin>>table[i].x>>table[i].y;
		
	}
	for(int i=0;i<V;i++)for(int j=0;j<V;j++)edge[i][j]=edge[j][i]=INF;
	for(int i=0;i<R;i++){
		int a,b;
		cin>>a>>b;
		
		edge[a-1][b-1]=dist(P(table[a-1]),P(table[b-1]));
		edge[b-1][a-1]=dist(P(table[a-1]),P(table[b-1]));

	}


	vector<P>a;
	a=convex_hull(table,V);
	//sort(table,table+V,cmp_x);



	

	for(int i=0;i<V;i++){
		for(int j=0;j<a.size();j++){
			if(table[i].x==a[j].x&&table[i].y==a[j].y){
			//cout<<a[j].x<<" "<<a[j].y<<" "<<i<<endl;
			used[i]=1;
			}
		}
	}	


	for(int i=0;i<V;i++){
		for(int j=0;j<V;j++){
			if(used[i]&&used[j]){
					edge[i][j]=dist(table[i],table[j]);
					edge[j][i]=dist(table[i],table[j]);
			}
		}
	}
	//for(int i=0;i<V;i++)cout<<used[i]<<" "<<table[i].x<<" "<<table[i].y<<endl;
	//for(int i=0;i<a.size();i++)cout<<a[i].x<<" "<<a[i].y<<" "<<"A"<<endl;
	double ans=0;

	for(int i=1;i<a.size();i++)ans+=dist(a[i],a[i-1]);
	ans+=dist(a[0],a[a.size()-1]);

	const int INF=100000;
	for(int i=0;i<V;i++){
		double min=INF;
		int num=0;
		if(used[i])continue;
		
		for(int j=0;j<V;j++){
			//?????????????????????????????¨???	
				if(min>edge[i][j]&&used[j]){
						min=edge[i][j];
						num=j;
				}
		}
		if(min==INF)continue;
		ans+=min;
		used[num]=true;
		
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:94:71: error: 'INF' was not declared in this scope
   94 |         for(int i=0;i<V;i++)for(int j=0;j<V;j++)edge[i][j]=edge[j][i]=INF;
      |                                                                       ^~~
Language: C

#include<iostream>
#include<string>
using namespace std;
int main(void);
 int n,c;
 cin>>n>>c;
 int p[n],q[n];
 for(int i=0,i<n,i++){
     p=0;
 }
 for(i=0;i<c;i++){
     int a,b,d;
     cin>>a;
     if(a=0){
         cin>>b>>d;
         n[b]+=d;
     }
     else{
         cin>>b;
         strcpy(q,p);
         for(int j=0;j<n-1;j++){
             for(int k=j+1;k<n;k++){
                 if(q[j]<q[k]){
                     int l=q[j];
                     q[j]=q[k];
                     q[k]=l;
                 }
             }
         }
         printf("%d %d",b,q[b-1]);
     }
 }
 return 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;
int main(void);
 int n,c;
 cin>>n>>c;
 int p[n],q[n];
 for(int i=0,i<n,i++){
     p=0;
 }
 for(i=0;i<c;i++){
     int a,b,d;
     cin>>a;
     if(a=0){
         cin>>b>>d;
         n[b]+=d;
     }
     else{
         cin>>b;
         strcpy(q,p);
         for(int j=0;j<n-1;j++){
             for(int k=j+1;k<n;k++){
                 if(q[j]<q[k]){
                     int l=q[j];
                     q[j]=q[k];
                     q[k]=l;
                 }
             }
         }
         printf("%d %d",b,q[b-1]);
     }
 }
 return 0;
}

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

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

#define INF 0x7fffffffffff
typedef long long int LLI;

int N;
int M;
LLI ts[1145];
LLI ss[1145];
LLI vs[3145];
LLI hs[3145];
LLI ds[1145];
LLI himos[3145];
LLI dimos[1145];
LLI vimos[1145];
LLI dp[1145][3145];

// [l, r)
LLI CalcD(int l, int r) {
  LLI ret = 0;
  r -= 2;
  l--;
  if (r >= 0) ret += dimos[r];
  if (l >= 0) ret -= dimos[l];
  return ret;
}

LLI CalcH(int l, int r) {
  LLI ret = 0;
  --r;
  --l;
  if (r >= 0) ret += himos[r];
  if (l >= 0) ret -= himos[l];
  return ret;
}

LLI CalcV(int l, int r) {
  LLI ret = 0;
  --r;
  --l;
  if (r >= 0) ret += vimos[r];
  if (l >= 0) ret -= vimos[l];
  return ret;
}

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

  for (int i=0; i<N; i++) {
    scanf("%lld%lld", &vs[i], &hs[i]);
  }

  for (int i=0; i<N-1; i++) {
    ds[i] = llabs(hs[i] - hs[i+1]);
  }

  himos[0] = hs[0];
  dimos[0] = ds[0];
  vimos[0] = vs[0];
  for (int i=1; i<N; i++) {
    himos[i] = himos[i-1] + hs[i];
    dimos[i] = dimos[i-1] + ds[i];
    vimos[i] = vimos[i-1] + vs[i];
  }

  for (int i=0; i<M; i++) {
    scanf("%lld%lld", &ts[i], &ss[i]);
  }

  for (int i=0; i<=M; i++) {
    for (int j=0; j<=N; j++) {
      dp[i][j] = -INF;
      argmax[i][j] = (i == 1) ? 0 : -1;
    }
  }
  
  dp[0][0] = 0;
  for (int i=1; i<=M; i++) {
    for (int k=0; k<=N; k++) {
      if (CalcV(0, k) > ts[i-1]) break;
      if (k > 0) dp[i][k] = max(dp[i][k], dp[i-1][k-1]);
      if (k > 1) dp[i][k] = max(dp[i][k], dp[i][k-1] + CalcD(k-2, k));
    }

    for (int k=0; k<=N; k++) {
      dp[i][k] = max(dp[i][k], dp[i-1][k]);
    }

    /*for (int j=0; j<=N; j++) {
      if (dp[i][j] < 0) printf("INF ");
      else printf("%03lld ", dp[i][j]);
    }
    puts("");*/

    for (int k=0; k<=N; k++) {
      if (CalcH(0, k)+dp[i][k] < ss[i-1]) {
        dp[i][k] = -INF; 
      }
    }
  }

  /*for (int i=0; i<=M; i++) {
    for (int j=0; j<=N; j++) {
      if (argmax[i][j] < 0) printf("-1 ");
      else printf("%02lld ", argmax[i][j]);
    }
    puts("");
  }

  for (int i=0; i<=M; i++) {
    for (int j=0; j<=N; j++) {
      if (dp[i][j] < 0) printf("INF ");
      else printf("%03lld ", dp[i][j]);
    }
    puts("");
  }*/

  for (int i=0; i<=N; i++) {
    if (dp[M][i] >= 0) {
      LLI ans = ts[M-1] - CalcV(0, i);
      assert (ans >= 0);
      printf("%lld\n", ans);
      return 0;
    }
  }

  puts("-1");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:74:7: error: 'argmax' was not declared in this scope
   74 |       argmax[i][j] = (i == 1) ? 0 : -1;
      |       ^~~~~~
Language: Java

import java.util.Scanner;

public class Main1 {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		int[] a = new int[4];
		for(int i = 0; i < 4; i++) {
			a[i] = stdin.nextInt();
		}
		
		if(a[0] == a[1] && a[2] == a[3]) {
			System.out.println("yes");
		} else if(a[0] == a[2] && a[1] == a[3]) {
			System.out.println("yes");
		} else if(a[0] == a[3] && a[1] == a[2]) {
			System.out.println("yes");
		} else {
			System.out.println("no");
		}

	}
}

Compiler output:
Main.java:3: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1 {
       ^
1 error
Language: Java

package PCK_Final_16;

import java.util.Scanner;

public class Q1 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int i, j, c = 0;
		int[] array = new int[4];
		for(i = 0;i < 4;++i){
			array[i] = sc.nextInt();
			for(j = 0;j < i;++j){
				if(array[j] == array[i]){
					c++;
					array[j] = -1;
					array[i] = -1;
				}
			}
		}
		System.out.println(c >= 2 ? "yes" : "no");
	}
}

Compiler output:
Main.java:5: error: class Q1 is public, should be declared in a file named Q1.java
public class Q1 {
       ^
1 error
Language: C

#include<stdio.h>

int main(){
  int a,b,c,d;
  scanf("%d %d %d %d",&a,&b,&c,&d);

  if(a==b&&!a==d){
    if(b==c){
    printf("yes");
    }
  }

  if(a==c&&a!=d){
    if(b==d){
      printf("yes");
    }
  }

  if(a==d&&a!=c){
    if(b==c){
      printf("yes");
    }
  }
  if(a==b&&b==c&&c==d){
    printf("yes");
  }
  else{
    printf("no");
  }

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

using System;

public class Test
{
	public static void Main()
	{
		int a[] = Console.ReadLine().Split().Select(int.Parse).ToArray();
		Array.Sort(a);
		if(a[0] == a[1] && a[2] == a[3]) Console.WriteLine("yes");
		else Console.WriteLine("no");
	}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Test
      | ^~~~~~
Language: C++

using System;
using System.Linq;

public class Test
{
	public static void Main()
	{
		int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray();
		Array.Sort(a);
		if(a[0] == a[1] && a[2] == a[3]) Console.WriteLine("yes");
		else Console.WriteLine("no");
	}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Linq;
      |       ^~~~~~
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Test
      | ^~~~~~
Language: C++

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

#define int long long
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
#define all(v) (v).begin(),(v).end()
#define each(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++)
#define pb push_back
#define fi first
#define se second
template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}

signed main(){
    int e[4];rep(i,4)cin>>e[i];
    sort(e,e+4);
    if(e[0]==e[1]&&e[2]==e[3])cout<<"yes"<<endl;
    else cout<<"no"<<endl;
    return 0;
}

Compiler output:
a.cc:1:4: error: stray '#' in program
    1 | ???#include<bits/stdc++.h>
      |    ^
a.cc:1:1: error: expected unqualified-id before '?' token
    1 | ???#include<bits/stdc++.h>
      | ^
a.cc:5:9: error: 'vector' does not name a type
    5 | typedef vector<int>vint;
      |         ^~~~~~
a.cc:6:9: error: 'pair' does not name a type
    6 | typedef pair<int,int>pint;
      |         ^~~~
a.cc:7:9: error: 'vector' does not name a type
    7 | typedef vector<pint>vpint;
      |         ^~~~~~
a.cc: In function 'int main()':
a.cc:19:22: error: 'cin' was not declared in this scope
   19 |     int e[4];rep(i,4)cin>>e[i];
      |                      ^~~
a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |     sort(e,e+4);
      |     ^~~~
      |     short
a.cc:21:31: error: 'cout' was not declared in this scope
   21 |     if(e[0]==e[1]&&e[2]==e[3])cout<<"yes"<<endl;
      |                               ^~~~
a.cc:21:44: error: 'endl' was not declared in this scope
   21 |     if(e[0]==e[1]&&e[2]==e[3])cout<<"yes"<<endl;
      |                                            ^~~~
a.cc:22:10: error: 'cout' was not declared in this scope
   22 |     else cout<<"no"<<endl;
      |          ^~~~
a.cc:22:22: error: 'endl' was not declared in this scope
   22 |     else cout<<"no"<<endl;
      |                      ^~~~
Language: C++

??????
????????¢
#include<
iostream
>
using namespace 
std
;
main(){
int
a, b, c, d;
cin
>> a >> b >> c >> d;
if ( a == b && c == d ||
a == c && b == d ||
a == d && b == c ) 
cout
<< "yes" << 
endl
;
else 
cout
<< "no" << 
endl
;
return 0;
}

Compiler output:
a.cc:2:9: error: extended character ¢ is not valid in an identifier
    2 | ????????¢
      |         ^
a.cc:3:10: error: missing terminating > character
    3 | #include<
      |          ^
a.cc:3:9: error: empty filename in #include
    3 | #include<
      |         ^
a.cc:1:1: error: expected unqualified-id before '?' token
    1 | ??????
      | ^
a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:12:1: error: 'cin' was not declared in this scope
   12 | cin
      | ^~~
a.cc:17:1: error: 'cout' was not declared in this scope
   17 | cout
      | ^~~~
a.cc:19:1: error: 'endl' was not declared in this scope
   19 | endl
      | ^~~~
a.cc:22:1: error: 'cout' was not declared in this scope
   22 | cout
      | ^~~~
a.cc:24:1: error: 'endl' was not declared in this scope
   24 | endl
      | ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int e1,e2,e3,e4;
  cin >> e1 >> e2 >> e3 >> e4;
  int a=e1+e2;
  int b=e1+e3;
  int c=e1+e4;
  int d=e2=
  if(e1+e2==e3+e4) cout << "yes\n";
  else if(e1+e3==e2+e4) cout << "yes\n";
  else if(e1+e4==e2+e3) cout << "yes\n";
  else cout << "no\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected primary-expression before 'if'
   11 |   if(e1+e2==e3+e4) cout << "yes\n";
      |   ^~
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else if(e1+e3==e2+e4) cout << "yes\n";
      |   ^~~~
Language: C++

#include <stdio.h>
int main(){
  int e1,e2,e3,e4;
    scanf("%d%d%d%d",&e1,&e2,&e3,&e4)
    if(e1==e2&&e2==e3) printf("Yes\n");
  if(e1==e3&&e2==e4)  printf("Yes\n");
  if(e1==e4&&e2==e3)  printf("Yes\n");
  else
     printf("No\n");
	
  returan 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:4:38: error: expected ';' before 'if'
    4 |     scanf("%d%d%d%d",&e1,&e2,&e3,&e4)
      |                                      ^
      |                                      ;
    5 |     if(e1==e2&&e2==e3) printf("Yes\n");
      |     ~~                                
a.cc:11:3: error: 'returan' was not declared in this scope
   11 |   returan 0;
      |   ^~~~~~~
Language: C++

#include <stdio.h>
int main(){
  int e1,e2,e3,e4;
  scanf("%d%d%d%d",&e1,&e2,&e3,&e4);
    if(e1==e2&&e2==e3) printf("Yes\n");
  if(e1==e3&&e2==e4)  printf("Yes\n");
  if(e1==e4&&e2==e3)  printf("Yes\n");
  else
     printf("No\n");
	
  returan 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'returan' was not declared in this scope
   11 |   returan 0;
      |   ^~~~~~~
Language: C++

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
テつ?つ?つ?つ?nt main(void){
テつ?つ?つ?つ?つ?つ?つ?つ?nt number[4];
テつ?つ?つ?つ?つ?つ?つ?つ?or(int i = 0; i < 4; i++){
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?in >> number[i];
テつ?つ?つ?つ?つ?つ?つ?つ?
テつ?つ?つ?つ?つ?つ?つ?つ?ort(number, number + 4);
テつ?つ?つ?つ?つ?つ?つ?つ?f((number[0] == number[1]) && (number[2] == number[3])){
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?out << "yes" << endl;
テつ?つ?つ?つ?つ?つ?つ?つ?else{
テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?out << "no" << endl;
テつ?つ?つ?つ?つ?つ?つ?つ?
テつ?つ?つ?つ?つ?つ?つ?つ?eturn 0;テつ?つ?
テつ?つ?つ?つ?

Compiler output:
a.cc:4:1: error: '\U000030c6\U00003064' does not name a type
    4 | テつ?つ?つ?つ?nt main(void){
      | ^~~~
Language: C++

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

int main(){
	int a[4];
	scanf("%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3]);
	sort(a,a+4);
	if(a[0] == a[1] && a[2] == a[3]) cout << "yes" <<endl;
	else cout << "no" << endl;

	fflush(stdin);
	getchar();

return 0;
}

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

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

int e[4];

int main() {
  cin >> e[0] >> e[1] >> e[2] >> e[3];
  sort(e,e+4)
  if(e[0] == e[1] && e[2] == e[3]) {
    cout << "yes" << endl;
  }else {
    cout << "no" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected ';' before 'if'
    8 |   sort(e,e+4)
      |              ^
      |              ;
    9 |   if(e[0] == e[1] && e[2] == e[3]) {
      |   ~~          
a.cc:11:4: error: 'else' without a previous 'if'
   11 |   }else {
      |    ^~~~
Language: C++

#include<sdio.h>
#include<iostream>
using namespace std;
int main(){
	int m,n,i,j,t,y;
	int e[5];
	for(i=0;i<4;i++){
		scanf("%d",&e[i]);
	}
	sort(e,e+4);
	if(e[0]==e[1] && e[2]==e[3]){
		printf("yes\n");
	}
	else{
		printf("no\n");
		}
	}
	

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

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
    int e[4];
    
    for(int i=0; i<4; i++) cin >> e[0];
    sort(&e[0], &e[0]+4);
    
    if(e[0]==e[1] && e[2]==e[3]) cout << "yes??? << endl;
    else cout << "no" << endl;
    
    return 0;
}

Compiler output:
a.cc:10:42: warning: missing terminating " character
   10 |     if(e[0]==e[1] && e[2]==e[3]) cout << "yes??? << endl;
      |                                          ^
a.cc:10:42: error: missing terminating " character
   10 |     if(e[0]==e[1] && e[2]==e[3]) cout << "yes??? << endl;
      |                                          ^~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:5: error: expected primary-expression before 'else'
   11 |     else cout << "no" << endl;
      |     ^~~~
Language: C++

#include <stdio.h>
#include <algorithm>
using namespace std;

int main(void) {
  int a[4], i;
  for(i = 0; i < n; ++i)scanf("%d", &a[i]);
  sort(a, a + 4);
  if(a[0] == a[1] && a[2] == a[3]) printf("yes\n");
  else printf("no\n");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: 'n' was not declared in this scope
    7 |   for(i = 0; i < n; ++i)scanf("%d", &a[i]);
      |                  ^
Language: C++

#include <iostream>
#include <math.h>

using namespace std;

int main ()
{
	int a[4];
	for (int i = 0; i < 4; i++)
	{
		cin >> a[i];
	}
	
	sort (a,a + 4);
	if (a[0] == a[1] && a[2] == a[3])
	{
		cout << "yes" << endl;
	}
	else
	{
		cout << "no" << endl;
	}
}


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

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

 int main(){

  int a,b,c,d;
  cin>>a>>b>>c>>d;

  if((a==b && c==d) || (a==c &&b==d) || (a==d &&c==b) || (a==b==c==d) )    cout<<"yes"<<endl;
  else cout<<"no"<<endl;

  return 0;
  }

~                          


Compiler output:
a.cc:15:2: error: expected class-name at end of input
   15 | ~
      |  ^
Language: C++

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

int main(){

    int e1,e2,e3,e4;
    cin>>e1>>e2>>e3>>e4;
    if(e1==e2||e1==e3||e1==e4){
       cout<<yes<<endl;
    } else {
       cout<<no<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'yes' was not declared in this scope
    9 |        cout<<yes<<endl;
      |              ^~~
a.cc:11:14: error: 'no' was not declared in this scope
   11 |        cout<<no<<endl;
      |              ^~
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){

    int e1,e2,e3,e4;
    cin>>e1>>e2>>e3>>e4;
    if(e1==e2||e1==e3||e1==e4){
       cout<<yes<<endl;
    } else if (e2==e3||e2==e4){
       cout<<yes<<endl;
    } else if (e3==e4){
       cout<<yes<<endl;
    } else {
       cout<<no<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'yes' was not declared in this scope
    9 |        cout<<yes<<endl;
      |              ^~~
a.cc:11:14: error: 'yes' was not declared in this scope
   11 |        cout<<yes<<endl;
      |              ^~~
a.cc:13:14: error: 'yes' was not declared in this scope
   13 |        cout<<yes<<endl;
      |              ^~~
a.cc:15:14: error: 'no' was not declared in this scope
   15 |        cout<<no<<endl;
      |              ^~
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){

    int e1,e2,e3,e4;
    cin>>e1>>e2>>e3>>e4;
    if(e1==e2||e1==e3||e1==e4){
       cout<<yes<<endl;
    } else if (e2==e3||e2==e4){
       cout<<yes<<endl;
    } else if (e3==e4){
       cout<<yes<<endl;
    } else {
       cout<<no<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'yes' was not declared in this scope
    9 |        cout<<yes<<endl;
      |              ^~~
a.cc:11:14: error: 'yes' was not declared in this scope
   11 |        cout<<yes<<endl;
      |              ^~~
a.cc:13:14: error: 'yes' was not declared in this scope
   13 |        cout<<yes<<endl;
      |              ^~~
a.cc:15:14: error: 'no' was not declared in this scope
   15 |        cout<<no<<endl;
      |              ^~
Language: C++

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

int main(){

    int e1,e2,e3,e4;
    cin>>e1>>e2>>e3>>e4;
    if(e1==e2&&e3==e4){
       cout<<yes<<endl;
    } else if (e2==e3&&e1==e4){
       cout<<yes<<endl;
    } else if (e1==e3&&e2==e4){
       cout<<yes<<endl;
    } else {
       cout<<no<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'yes' was not declared in this scope
    9 |        cout<<yes<<endl;
      |              ^~~
a.cc:11:14: error: 'yes' was not declared in this scope
   11 |        cout<<yes<<endl;
      |              ^~~
a.cc:13:14: error: 'yes' was not declared in this scope
   13 |        cout<<yes<<endl;
      |              ^~~
a.cc:15:14: error: 'no' was not declared in this scope
   15 |        cout<<no<<endl;
      |              ^~
Language: C++

using System;
using System.Linq;

public class Test
{
	public static void Main()
	{
		int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray();
		Array.Sort(a);
		if(a[0] == a[1] && a[1] == a[2] && a[2] == a[3] && a[4] == a[5] && a[5] == a[6] && a[6] == a[7] && a[8] == a[9] && a[9] == a[10] && a[10] == a[11]) Console.WriteLine("yes");
		else Console.WriteLine("no");
	}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Linq;
      |       ^~~~~~
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Test
      | ^~~~~~
Language: C++

//============================================================================
// Name        : AOJ.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cctype>
using namespace std;


int main() {
	int a[12];
	for(int i=0;i<12;i++){
		cin>>a[i];
	}
	sort(a,a+12);
	if(a[0]==a[3]&&a[4]==a[7]&&a[8]==a[11])cout<<"yes"<<endl;
	else cout<<"no"<<endl;
	return 0;
}

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

//============================================================================
// Name        : AOJ.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cctype>
using namespace std;

int main() {
	int a[12];
	for(int i=0;i<12;i++){
		cin>>a[i];
	}
	sort(a,a+12);
	if(a[0]==a[3]&&a[4]==a[7]&&a[8]==a[11]){
		cout<<"yes"<<endl;
	}
	else cout<<"no"<<endl;
	return 0;
}

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

//============================================================================
// Name        : AOJ.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cctype>
using namespace std;

int main() {
	int a[12];
	for(int i=0;i<12;i++){
		cin>>a[i];
	}
	sort(a,a+12,greater<int>());
	if(a[0]==a[3]&&a[4]==a[7]&&a[8]==a[11]){
		cout<<"yes"<<endl;
	}
	else cout<<"no"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   21 |         sort(a,a+12,greater<int>());
      |         ^~~~
      |         sqrt
Language: C++

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

int e[12];

int main() {
  cin >> e[0] >> e[1] >> e[2] >> e[3] >> e[4]
  >> e[5] >> e[6 >> e[7] >> e[8] >> e[9] >> e[10]
  >> e[11] >> e[12];
  sort(e,e+12);
  if(e[0] == e[1] == e[2] == e[3] && e[4] == e[5] == e[6] == e[7] &&
      e[8] == e[9] == e[10] == e[11]) {
        cout << "yes" << endl;
      } else {
        cout << "no" <<endl;
      }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected ']' before ';' token
    9 |   >> e[11] >> e[12];
      |                    ^
      |                    ]
Language: C++

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

int e[12];

int main() {
  cin >> e[0] >> e[1] >> e[2] >> e[3] >> e[4]
  >> e[5] >> e[6 >> e[7] >> e[8] >> e[9] >> e[10] >> e[11];
  sort(e,e+12);
  if(e[0] == e[1] == e[2] == e[3] && e[4] == e[5] == e[6] == e[7] &&
      e[8] == e[9] == e[10] == e[11]) {
        cout << "yes" << endl;
      } else {
        cout << "no" <<endl;
      }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:59: error: expected ']' before ';' token
    8 |   >> e[5] >> e[6 >> e[7] >> e[8] >> e[9] >> e[10] >> e[11];
      |                                                           ^
      |                                                           ]
Language: C++

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

int e[12];

int main() {
  cin >> e[0] >> e[1] >> e[2] >> e[3] >> e[4] >> e[5] >> e[6 >> e[7] >> e[8] >> e[9] >> e[10] >> e[11];
  sort(e,e+12);
  if(e[0] == e[1] == e[2] == e[3] && e[4] == e[5] == e[6] == e[7] &&
      e[8] == e[9] == e[10] == e[11]) {
        cout << "yes" << endl;
      } else {
        cout << "no" <<endl;
      }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:103: error: expected ']' before ';' token
    7 |   cin >> e[0] >> e[1] >> e[2] >> e[3] >> e[4] >> e[5] >> e[6 >> e[7] >> e[8] >> e[9] >> e[10] >> e[11];
      |                                                                                                       ^
      |                                                                                                       ]
Language: C++

#include<sdio.h>
#include<iostream>
using namespace std;
int main(){
	int m,n,i,j,t,y;
	int e[15];
	for(i=0;i<4;i++){
		scanf("%d",&e[i]);
	}
	sort(e,e+12);
	if(e[0]==e[1] && e[2]==e[3] && e[5]==e[6] && e[7]==e[8] && e[9]==e[10] && e[11] && e[12]){
		printf("yes\n");
	}
	else{
		printf("no\n");
		}
	}
	

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

#include<sdio.h>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int m,n,i,j,t,y;
	int e[15];
	for(i=0;i<4;i++){
		scanf("%d",&e[i]);
	}
	sort(e,e+12);
	if(e[0]==e[1] && e[2]==e[3] && e[5]==e[6] && e[7]==e[8] && e[9]==e[10] && e[11] && e[12]){
		printf("yes\n");
	}
	else{
		printf("no\n");
		}
	}
	

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

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a[12];
	int i,j;
	int cut=0;
	int b[3]={1,5,9};
	for(i=0;i<12;i++){
		cin>>a[i];
	}
	for(i=0;i<12;i++){
		for(j=11;j>i;j--){
			if(a[i]>a[j]){
				swap(a[i],a[j]);
			}
		}
	}
	for(i=0;i=3;i++){
		for(j=b[i];j<b[i]+2){
			if(b[i]==a[j]){
				cut++;
			}
		}
	}
	if(cut==12){
		cout<<"yes"<<endl;
	}
	else{
		cout<<"no"<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:36: error: expected ';' before ')' token
   20 |                 for(j=b[i];j<b[i]+2){
      |                                    ^
      |                                    ;
Language: C++

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

int main() {
    int e[12];
    for(int a = 0; a < 12; +;a) {
        cin >> e[a];
    }
    sort(e,e+12);

    if(e[0] ==  e[1] == e[2] == e[3] && e[4] == e[5] == e[6] == e[7] && e[8] == e[9] == e[10] == e[11]) {
        cout << "yes" << endl;
    }else {
        cout << "no" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:29: error: expected primary-expression before ';' token
    6 |     for(int a = 0; a < 12; +;a) {
      |                             ^
a.cc:6:29: error: expected ')' before ';' token
    6 |     for(int a = 0; a < 12; +;a) {
      |        ~                    ^
      |                             )
a.cc:6:30: error: 'a' was not declared in this scope
    6 |     for(int a = 0; a < 12; +;a) {
      |                              ^
Language: C++

#include <iostream>
#include <math.h>
#include <cmath>
#include <stdio.h>
#include <string>
#include <string.h>

using namespace std;

int main (void)
{
	int a[12];

	for (int i = 0; i < 12; i++)
	{
		cin >> a[i];
	}
	sort (a,a + 12);
	int ng = 0,p = 0;

	for (int j = 0; j < 3; j++)
	{
		for (int i = j + (3 * j); i < j + (3 * j) + 3; i++)
		{
			if (a[i] != a[i + 1])
			{
				ng += 1;
				p += 1;
				break;
			}
		}
		if (p == 1)
		{
			break;
		}
	}
	if (ng != 0)
	{
		cout << "no" << endl;
	}
	else
	{
		cout << "yes" << endl;
	}
}


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

/*
  AOJ #0347
  title:
  @kankichi573
 */
#include <stdio.h>
#include <stdlib.h>
#include <float.h>
double max(double x,double y)
{
  if(x>y)
    return(x);
  else
    return(y);
}
int n,ar[1000];


int comp( const void * a , const void * b ) {

  if( *( int * )a < *( int * )b ) {
    return -1;
  }
  else
  if( *( int * )a == *( int * )b ) {
    return 0;
  }
  return 1;
}

int main()
{
  int i,m2;
  double ret;

  scanf("%d",&n);
  for(i=0;i<n;i++)
    scanf("%d",&ar[i]);
  qsort(ar,n,sizeof(int),comp);
  ret=0.0;
  m2=ar[n-2]+ar[n-1];
  #ifdef DEBUG
  for(i=0;i<n;i++)
    printf("%d ",ar[i]);
  printf("\n");
  printf("m2=%d \n",m2);
  #endifh
  for(i=0;i<n-2;i++)
    ret=max(ret,(double)m2/(ar[i+1]-ar[i]));
  ret=max(ret,(ar[n-1]+ar[n-4])/(ar[n-2]-ar[n-3]));
  ret=max(ret,(ar[n-3]+ar[n-4])/(ar[n-2]-ar[n-1]));
  printf("%.5lf\n",ret);
  return(0);
}

Compiler output:
main.c: In function 'main':
main.c:42: error: unterminated #ifdef
   42 |   #ifdef DEBUG
main.c:41:3: error: expected declaration or statement at end of input
   41 |   m2=ar[n-2]+ar[n-1];
      |   ^~
Language: C++

var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var arr=input.trim().split("\n");
arr.shift();
var a = arr.shift().split(" ").map(Number);
a.sort(function(a,b){
   return b-a;
});
var s = [];
a.reduce(function(a,b){
   s.push([a-b,a,b]); 
   return b;
});
var max = 0;
a.reduce(function(a,b){
   s.forEach(function(v){
      if(v[1] != a && v[2] != b && v[1] != b && v[2] != a){
         max = Math.max(max, (a+b)/v[0]).toFixed(6);
      }
   });
   return b;
});
console.log(max);

Compiler output:
a.cc:1:21: warning: multi-character character constant [-Wmultichar]
    1 | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
      |                     ^~~~
a.cc:1:40: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
    1 | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
      |                                        ^~~~~~~~~~~~
a.cc:1:54: warning: multi-character character constant [-Wmultichar]
    1 | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
      |                                                      ^~~~~~
a.cc:1:1: error: 'var' does not name a type
    1 | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
      | ^~~
a.cc:2:1: error: 'var' does not name a type
    2 | var arr=input.trim().split("\n");
      | ^~~
a.cc:3:1: error: 'arr' does not name a type
    3 | arr.shift();
      | ^~~
a.cc:4:1: error: 'var' does not name a type
    4 | var a = arr.shift().split(" ").map(Number);
      | ^~~
a.cc:5:1: error: 'a' does not name a type
    5 | a.sort(function(a,b){
      | ^
a.cc:7:2: error: expected unqualified-id before ')' token
    7 | });
      |  ^
a.cc:8:1: error: 'var' does not name a type
    8 | var s = [];
      | ^~~
a.cc:9:1: error: 'a' does not name a type
    9 | a.reduce(function(a,b){
      | ^
a.cc:12:2: error: expected unqualified-id before ')' token
   12 | });
      |  ^
a.cc:13:1: error: 'var' does not name a type
   13 | var max = 0;
      | ^~~
a.cc:14:1: error: 'a' does not name a type
   14 | a.reduce(function(a,b){
      | ^
a.cc:21:2: error: expected unqualified-id before ')' token
   21 | });
      |  ^
a.cc:22:1: error: 'console' does not name a type; did you mean 'const'?
   22 | console.log(max);
      | ^~~~~~~
      | const
Language: C++

using System;
using System.Linq;

public class Test
{
	public static void Main()
	{
		int n = int.Parse(Console.ReadLine());
		int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray();
		Array.Sort(a);
		double ret = 0.0;
		for(int i = 0; i < n - 1; i++) {
			for(int j = i + 2; j < n - 1; j++) {
				double c1 = 1.0 * (a[j + 1] + a[j]) / (a[i + 1] - a[i]);
				double c2 = 1.0 * (a[i + 1] + a[i]) / (a[j + 1] - a[j]);
				ret = Math.Max(ret, c1);
				ret = Math.Max(ret, c2);
			}
		}
		Console.WriteLine(ret);
	}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Linq;
      |       ^~~~~~
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Test
      | ^~~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int n;
	cin >> n;
	long long a[1000];
	for (int i = 0; i < n; i++) cin >> a[i];
	sort(a, a + n);
	long long b = 1000000000;
	for (int i = 1; i < n-2; i++) {
		if (a[i] - a[i - 1] < b) b = a[i] - a[i - 1];
	}
	long float d = max(max((a[n - 1] + a[n - 2]) / (b), ((a[n - 1] + a[n - 4]) / (a[n - 2] - a[n - 3]))), (a[n - 3] + a[n - 4]) / (a[n - 1] - a[n - 2]));
	cout << d << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'long' specified with 'float'
   14 |         long float d = max(max((a[n - 1] + a[n - 2]) / (b), ((a[n - 1] + a[n - 4]) / (a[n - 2] - a[n - 3]))), (a[n - 3] + a[n - 4]) / (a[n - 1] - a[n - 2]));
      |         ^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<cstdio>
#include <iomanip>
using namespace std;
int main() {
	while (true) {
		int n;
		cin >> n;
		long float  a[1000];
		for (int i = 0; i < n; i++) cin >> a[i];
		sort(a, a + n);
		long long b = 1000000000;
		for (int i = 1; i < n - 2; i++) {
			if (a[i] - a[i - 1] < b) b = a[i] - a[i - 1];
		}
		long float d = max(max((a[n - 1] + a[n - 2]) / (b), ((a[n - 1] + a[n - 4]) / (a[n - 2] - a[n - 3]))), (a[n - 3] + a[n - 4]) / (a[n - 1] - a[n - 2]));
		printf("%Lf\n", d);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'long' specified with 'float'
   10 |                 long float  a[1000];
      |                 ^~~~
a.cc:17:17: error: 'long' specified with 'float'
   17 |                 long float d = max(max((a[n - 1] + a[n - 2]) / (b), ((a[n - 1] + a[n - 4]) / (a[n - 2] - a[n - 3]))), (a[n - 3] + a[n - 4]) / (a[n - 1] - a[n - 2]));
      |                 ^~~~
Language: C++

#include<bits/
stdc
++.h>
using namespace 
std
;
int
main(){
int
n,i,j,k
;
cin
>>n;
double 
a[n
],
ans
=0,x,y;
for(
i
=0;i<
n;i
++) 
cin
>>a[
i
];
sort(
a,a+n
);
for(
i
=0;i<
n;i
++){
for(j=i+1;j<
n;j
++){
k=n
-
1;
while(k==
i
||k==j) k
--
;
x=a[k];k
--
;
while(k==
i
||k==j) k
--
;
y=a[k];
ans
=max(
ans
,(
x+y
)/(a[j]
-
a[
i
]));
}
}
printf
("%6lf
\
n",
ans
);
return 0;
}

Compiler output:
a.cc:1:15: error: missing terminating > character
    1 | #include<bits/
      |               ^
a.cc:1:9: fatal error: bits/: No such file or directory
    1 | #include<bits/
      |         ^
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
 
#define PB push_back
#define MP make_pair
#define ALL(a) (a).begin(),(a).end()
#define PII pair<int,int>
#define VS vector<string>
#define VI vector<int>
#define ll long long
#define ull unsigned long long
#define FST first
#define SEC second
int main(){
  int n;
  cin>>n;
  VI V(n);
  REP(i,n)cin>>V[i];
  sort(ALL(V));
  int mi=1e9;
  REP(i,n-3){
    mi=min(mi,V[i+1]-V[i]);
  }
  double ans=(double)(V[n-1]+V[n-2])/(double)mi;
  double d=(double)(V[n-3]+V[n-4])/(double)(V[n-1]-V[n-2]);
  ans=max(ans,d);
  double d=(double)(V[n-1]+V[n-4])/(double)(V[n-2]-V[n-3]);
  ans=max(ans,d);
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:10: error: redeclaration of 'double d'
   31 |   double d=(double)(V[n-1]+V[n-4])/(double)(V[n-2]-V[n-3]);
      |          ^
a.cc:29:10: note: 'double d' previously declared here
   29 |   double d=(double)(V[n-3]+V[n-4])/(double)(V[n-1]-V[n-2]);
      |          ^
Language: C++

#include<sdio.h>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int m,n,a[1000],i,j;
	float ans=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	sort(a,a+n);
	ans=(a[n]+a[n-1])/(a[1]-a[0]);
	printf("%1.6f",ans);
}

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

#include<sdio.h>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int m,n,a[1000],i,j;
	float ans=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	sort(a,a+n);
	ans=(float)(a[n]+a[n-1])/(a[1]-a[0]);
	printf("%.6f",ans);
}

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

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

int n;
vector<int> a;
multiset<int> s;
double ans, ans2;
int main(){
    cin >> n;
    a.resize(n);
    sort(a.begin(), a.end());
    
    for(int i=0; i<n-1; i++) s.insert(a[i+1]-a[i]);
    
    int flag;
    int b;
    for(int i=0; i<100 && b.size(); i++){
        b= *(s.begin());
        for(int j=0; j<n; j++){
            flag =0;
            if(j+2<n-1 && a[j+2]-a[j+1]==b) flag+=1;
            if(j+1<n-1 && a[j+1]-a[j]==b) flag+=1;
            if(j-1 >=0 && a[j]-a[j-1]==b) flag+=1;
            
            if(flag < s.count(b)){
                ans2 = a[j]+a[j+1];
                ans2 /= b[i];
                ans = max(ans, ans2);
            }
        }
        s.erase(b);
    }
    
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:29: error: request for member 'size' in 'b', which is of non-class type 'int'
   20 |     for(int i=0; i<100 && b.size(); i++){
      |                             ^~~~
a.cc:30:26: error: invalid types 'int[int]' for array subscript
   30 |                 ans2 /= b[i];
      |                          ^
Language: C++

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

int n;
vector<int> a;
multiset<int> s;
double ans, ans2;
int main(){
    cin >> n;
    a.resize(n);
    sort(a.begin(), a.end());
    
    for(int i=0; i<n-1; i++) s.insert(a[i+1]-a[i]);
    
    int flag;
    int b;
    for(int i=0; i<100 && s.size(); i++){
        b= *(s.begin());
        for(int j=0; j<n; j++){
            flag =0;
            if(j+2<n-1 && a[j+2]-a[j+1]==b) flag+=1;
            if(j+1<n-1 && a[j+1]-a[j]==b) flag+=1;
            if(j-1 >=0 && a[j]-a[j-1]==b) flag+=1;
            
            if(flag < s.count(b)){
                ans2 = a[j]+a[j+1];
                ans2 /= b[i];
                ans = max(ans, ans2);
            }
        }
        s.erase(b);
    }
    
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:26: error: invalid types 'int[int]' for array subscript
   30 |                 ans2 /= b[i];
      |                          ^
Language: C++

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

int n;
vector<int> a;
multiset<int> s;
double ans, ans2;
int main(){
    cin >> n;
    a.resize(n);
    sort(a.begin(), a.end());
    
    for(int i=0; i<n-1; i++) s.insert(a[i+1]-a[i]);
    
    int flag;
    double b;
    ans=0; ans2=0;
    multiset<int>::iterator itr;
    for(int i=0; s.size(); i++){
        itr = s.begin();
        b = (*itr)
        for(int j=0; j<n; j++){
            flag =0;
            if(j+2<n-1 && a[j+2]-a[j+1]==b) flag+=1;
            if(j+1<n-1 && a[j+1]-a[j]==b) flag+=1;
            if(j-1 >=0 && a[j]-a[j-1]==b) flag+=1;
            
            if(flag < s.count(b)){
                ans2 = a[j]+a[j+1];
                ans2 /= b;
                ans = max(ans, ans2);
            }
        }
        s.erase(b);
    }
    
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:19: error: expected ';' before 'for'
   24 |         b = (*itr)
      |                   ^
      |                   ;
   25 |         for(int j=0; j<n; j++){
      |         ~~~        
a.cc:25:22: error: 'j' was not declared in this scope
   25 |         for(int j=0; j<n; j++){
      |                      ^
Language: Java

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- > 0) {
            boolean[] used = new boolean[14];
            boolean ans = false;
            for (int i = 0; i < 6; i++) {
                used[sc.nextInt()] = true;
            }
            if (used[1] == used[13])
                ans=!used[1];
            else {
                int l = 6, r = 8;
                boolean t=false;
                for (;;) {
                    if (t && used[1]) {
                        if (used[r]^t)
                            r++;
                        else if (used[l]^t)
                            l--;
                    } else  {
                        if (used[l]^t)
                            l--;
                        else if (used[r]^t)
                            r++;
                    }
                    if (r == 13) {
                        ans= !used[1];
                        break;
                    }
                    if (l == 1) {
                        ans=  used[1];
                        break;
                    }
                    t = !t;
                }
            }
            System.out.println(ans ? "yes" : "no");
        }
    }
}


Compiler output:
Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
       ^
1 error
Language: Java

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- > 0) {
            boolean[] used = new boolean[14];
            boolean ans = false;
            for (int i = 0; i < 6; i++) {
                used[sc.nextInt()] = true;
            }
            if (used[1] == used[13])
                ans=!used[1];
            else {
                int l = 6, r = 8;
                boolean t=false;
                for (;;) {
                    if (t == used[1]) {
                        if (used[r]^t)
                            r++;
                        else if (used[l]^t)
                            l--;
                    } else  {
                        if (used[l]^t)
                            l--;
                        else if (used[r]^t)
                            r++;
                    }
                    if (r == 13 || l==1) {
                      //  ans= !used[1];
                        ans=used[1]^r==13;
                        break;
                    }
//                    if (l == 1) {
//                        ans=  used[1];
//                        break;
//                    }
                    t = !t;
                }
            }
            System.out.println(ans ? "yes" : "no");
        }
    }
}


Compiler output:
Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
       ^
1 error
Language: C++

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

int main(){
    int Tc;
    cin>>Tc;
    while(Tc--){
        set<int> a,b;
        for(int i=0;i<6;i++){
            int x;
            cin>>x;
            a.insert(x);
        }
        for(int i=1;i<=13;i++)
            if(a.count(i)==0&&i!=7)b.insert(i);
        int l=6,r=8,ans;
        for(ans=1;;ans++){
            
            if(a.count(l)&&a.count(r)){
                if(a.count(1))a.erase(l),l--;
                else a.erase(r),r++;
            }else if(a.count(l)==1){
                a.erase(l),l--;
            }else if(a.count(r)==1){
                a.erase(r),r++;
            }
            
            if(a.empty())break;
            swap(a,b);
        }
        cout<< (ans&1?"yes":"no") <<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'set' was not declared in this scope
    9 |         set<int> a,b;
      |         ^~~
a.cc:3:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    2 | #include <algorithm>
  +++ |+#include <set>
    3 | using namespace std;
a.cc:9:13: error: expected primary-expression before 'int'
    9 |         set<int> a,b;
      |             ^~~
a.cc:13:13: error: 'a' was not declared in this scope
   13 |             a.insert(x);
      |             ^
a.cc:16:16: error: 'a' was not declared in this scope
   16 |             if(a.count(i)==0&&i!=7)b.insert(i);
      |                ^
a.cc:16:36: error: 'b' was not declared in this scope
   16 |             if(a.count(i)==0&&i!=7)b.insert(i);
      |                                    ^
a.cc:20:16: error: 'a' was not declared in this scope
   20 |             if(a.count(l)&&a.count(r)){
      |                ^
a.cc:29:16: error: 'a' was not declared in this scope
   29 |             if(a.empty())break;
      |                ^
a.cc:30:18: error: 'a' was not declared in this scope
   30 |             swap(a,b);
      |                  ^
a.cc:30:20: error: 'b' was not declared in this scope
   30 |             swap(a,b);
      |                    ^
Language: C

#include<stdio.h>
using namespace std;
int n,i,p,c,ans=0;
int a[100000];
int x[100000];
int y[100000];

int main(){
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    x[i]=-1;
    y[i]=-1;
  }
  for(i=0;i<n;i++){
    p=i;
    c=0;
    while(x[p]==-1){
      x[p]=c++;
      y[p]=i;
      p=(p+a[p])%n;
    }
    if(y[p]==i)ans+=(c-x[p]);
  }
  printf("%d\n",ans);
  return 0;
}

Compiler output:
main.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~