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

#include <stdio.h>

int main(){
int n,i,j;
int a,b,c;

scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&a);
b=0;
f=0;
for(j=1;j<10;j++){
scanf("%d",&c);
if(a>c&&b>c)f=1;
else if(a<c&&b<c){
if(a>b)a=c;
else b=c;
}
else{
if(a>b)b=c;
else a=c;
}
}
if(f==0){
printf("YES\n");
}
else if(f==1){
printf("NO\n");
}
}
return 0;
}

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

#include<iostream>
using namespace std;
int arr[10],used[10];
void DFS(int pre,int cur)
{
   if(cur<10&&arr[pre]<arr[cur])
   {
	   used[cur]=1;
	   DFS(cur,cur+1);
   }
   else if(cur<10&&arr[pre]>=arr[cur])
	   DFS(pre,cur+1);
}
int main()
{
   int T,pre;
   bool judge;
   cin>>T;
   while(T--)
   {
     for(int i=0;i<10;i++)
		 cin>>arr[i];
	 for(int i=0;i<10;i++)
	 {
		 memset(used,0,sizeof(used));
		 used[i]=1;
	     DFS(i,i+1);
		 judge=false;
		 pre=0;
	     for(int j=0;j<10;j++)
		    if(used[j]==0)
				if(pre>=arr[j])
			{
				judge=true;
				break;
			}else pre=arr[j];
		 if(!judge)
		 {
			 cout<<"YES"<<endl;
			 break;
		 }
	 }
	 if(judge)cout<<"NO"<<endl;
   }

}

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

#include <iostream>

using namespace std;

int ball_list[10];
int right_list[10];
int left_list[10];

bool flag;

void dfs(int right, int left){
  int count = right + left;

  if(count == 10){
    flag = true;
  }else{
    if(right == 0 || right_list[right-1] < ball_list[count]){
      if(right == 0){
        right_list[0] = ball_list[count];
      }else{
        right_list[right-1] = ball_list[count];
      }
      dfs(right+1, left);
    }
    if(left == 0 || left_list[left-1] < left_list[left]){
      if(left == 0){
        left_list[0] = ball_list[count];
      }else{
        left_list[left-1] = ball_list[count];
      }
      dfs(right, left+1);
    }
  }
}

int main(){
  int n;

  cin >> n;

  for(int i = 0; i < n; i++){
    flag = false;
    memset(right_list, 0, sizeof(right_list));
    memset(left_list, 0, sizeof(left_list));

    for(int j = 0; j < 10; j++){
      cin >> ball_list[j];
    }
    
    dfs(0, 0);

    if(flag){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }

  return 0;
}

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

#include<iostream>
using namespace std;
int main(){
  int t;
  cin >> t;
  int n[10];
  for(int i=0;i<t;i++){
    int h = 0,b = 0,c = 0;
    for(int j=0;j<10;j++) cin >> n[i]; 
    for(int j=0;j<10;j++){
      cin >> n[i];
      if(b==0) b = n[i];
      else if(b>c&&b<n) b = n[i];
      else if(c>b&&c<n) c = n[i];
      else if(b>c&&b>n&&c<n) c = n[i];
      else if(c>b&&c>n&&b<n) b = n[i];
      else if(b>n[i]&&c>n[i]){
	cout << "NO" << endl;
	h = 1;
	break;
      }
    }
    if(h==0) cout << "YES" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |       else if(b>c&&b<n) b = n[i];
      |                    ~^~
a.cc:14:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |       else if(c>b&&c<n) c = n[i];
      |                    ~^~
a.cc:15:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |       else if(b>c&&b>n&&c<n) c = n[i];
      |                    ~^~
a.cc:15:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |       else if(b>c&&b>n&&c<n) c = n[i];
      |                         ~^~
a.cc:16:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |       else if(c>b&&c>n&&b<n) b = n[i];
      |                    ~^~
a.cc:16:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |       else if(c>b&&c>n&&b<n) b = n[i];
      |                         ~^~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int t;
  cin >> t;
  int n[10];
  for(int i=0;i<t;i++){
    int h = 0,b = 0,c = 0;
    for(int j=0;j<10;j++) cin >> n[i]; 
    for(int j=0;j<10;j++){
      if(b==0) b = n[i];
      else if(b>c&&b<n) b = n[i];
      else if(c>b&&c<n) c = n[i];
      else if(b>c&&b>n&&c<n) c = n[i];
      else if(c>b&&c>n&&b<n) b = n[i];
      else if(b>n[i]&&c>n[i]){
	cout << "NO" << endl;
	h = 1;
	break;
      }
    }
    if(h==0) cout << "YES" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |       else if(b>c&&b<n) b = n[i];
      |                    ~^~
a.cc:13:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |       else if(c>b&&c<n) c = n[i];
      |                    ~^~
a.cc:14:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |       else if(b>c&&b>n&&c<n) c = n[i];
      |                    ~^~
a.cc:14:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |       else if(b>c&&b>n&&c<n) c = n[i];
      |                         ~^~
a.cc:15:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |       else if(c>b&&c>n&&b<n) b = n[i];
      |                    ~^~
a.cc:15:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |       else if(c>b&&c>n&&b<n) b = n[i];
      |                         ~^~
Language: C++

//0033
//include-------------------------------------
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cmath>
#include<map>
#include<stack>

using namespace std;

//typedef--------------------------------------
typedef vector<int> VI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

#define MP make_pair

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

//constant-------------------------------------
const double PI = acos(-1.0);

//cout,cin-------------------------------------
#define COUT(x) cout<<(x)<<endl;
#define CIN(x) cin>>(x);


int main(){
	int n;
	int x[10];
	bool ans;

	CIN(n);

	REP(i, n){
		
		REP(j, 10) CIN(x[j]);
		stack<int> B, C;
		B.push(0);
		C.push(0);

		REP(j, 10){
			if ((B.top() > x[j]) && (C.top() > x[j])){
				ans = false;
				break;
			}
			else { 
				if ((B.top() >= C.top()) && (B.top() < x[j])) B.push(x[j]);
				else C.push(x[j]);
			}

		}
		COUT(ans==false?"NO":"YES");
		
	}

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

int main (){
       int N,a[20]={0},b[20]={0},t;
       int ac=0,bc=0;
       cin>>N;
       for(int j=0;j<N;j++){
       for(int i=0;i<10;i++){
              cin>>t;
              if(a[ac]<t){
                 a[ac+1]=t;
                 ac++;
               }
               else if(b[bc]<t){
                  b[bc+1]=t;
                  bc++;
                }
                else break;
           }
           if(ac+bc==10){
                 cout<<"YES"<<endl;
            }
           else cout<<"NO"<<endl;
           }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: 'cin' was not declared in this scope
    4 |        cin>>N;
      |        ^~~
a.cc:19:18: error: 'cout' was not declared in this scope
   19 |                  cout<<"YES"<<endl;
      |                  ^~~~
a.cc:19:31: error: 'endl' was not declared in this scope
   19 |                  cout<<"YES"<<endl;
      |                               ^~~~
a.cc:21:17: error: 'cout' was not declared in this scope
   21 |            else cout<<"NO"<<endl;
      |                 ^~~~
a.cc:21:29: error: 'endl' was not declared in this scope
   21 |            else cout<<"NO"<<endl;
      |                             ^~~~
Language: C++

#include <iostream>
#define CAPACITY 9
using namespace std;
int b, c;

bool dfs(int pos, int ary[], bool flag) {
    cout << "B = " << b << "C = " << c << endl;
    if(pos < 0) {
        return(false);
    }

    flag = dfs(pos - 1, ary, flag);
    
    if(ary[pos] > b) {
        b = ary[pos];
    } else if(ary[pos] > c) {
        c = ary[pos];
    } else {
        return(false);
    }
    
    if(pos == CAPACITY) {
        flag = true;
    }
    
    return(flag);
}

int main(void) {
    int num;
    
    cin >> num;
    int ary[10];
    
    for(int r = 0; r < num; r++) {
        for(int c = 0; c < 10; c++) {
            cin >> ary[c];
        }
        b = ary[0];
        c = INT_MIN;
        if(dfs(CAPACITY, ary, true)) {
            cout << "YES";
        } else {
            cout << "NO";
        }
        cout << endl;
    }
    
    return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:13: error: 'INT_MIN' was not declared in this scope
   40 |         c = INT_MIN;
      |             ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 | #define CAPACITY 9
Language: C++

#include <iostream>
#define CAPACITY 9
using namespace std;
int b, c;

bool dfs(int pos, int ary[], bool flag) {
    if(pos < 0) {
        return(false);
    }
    
    flag = dfs(pos - 1, ary, flag);
    
    if(pos == CAPACITY) {
        flag = true;
    }
    if(ary[pos] > b) {
        b = ary[pos];
    } else if(ary[pos] > c) {
        c = ary[pos];
    } else {
        return(false);
    }
    cout << "B = " << b << "C = " << c << endl;
    
    return(flag);
}

int main(void) {
    int num;
    
    cin >> num;
    int ary[10];
    
    for(int r = 0; r < num; r++) {
        for(int c = 0; c < 10; c++) {
            cin >> ary[c];
        }
        b = ary[0];
        c = INT_MIN;
        if(dfs(CAPACITY, ary, true)) {
            cout << "YES";
        } else {
            cout << "NO";
        }
        cout << endl;
    }
    
    return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:13: error: 'INT_MIN' was not declared in this scope
   39 |         c = INT_MIN;
      |             ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 | #define CAPACITY 9
Language: C++

#include <iostream>

bool judge(int num){
	int i, n, q[2]={0,0};

	for (i=0; i<num; i++) {
		cin >> n;
		if (q[0]<n)
			q[0] = n;
		else if (q[1]<n)
			q[1] = n;
		else
			break;
	}

	if (i==num)
		return true;
	else
		return false;
}

int main(){
	int lines;

	cin >> lines;
	for (i=0; i<lines; i++) {
		if (judge(10))
			cout << "NO\n";
		else
			cout << "YES\n";
	}
	return 0;
}

Compiler output:
a.cc: In function 'bool judge(int)':
a.cc:7:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |                 cin >> n;
      |                 ^~~
      |                 std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc: In function 'int main()':
a.cc:25:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   25 |         cin >> lines;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:26:14: error: 'i' was not declared in this scope
   26 |         for (i=0; i<lines; i++) {
      |              ^
a.cc:28:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   28 |                         cout << "NO\n";
      |                         ^~~~
      |                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:30:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   30 |                         cout << "YES\n";
      |                         ^~~~
      |                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>

using namespace std;

bool judge(int num){
	int i, n, q[2]={0,0};

	for (i=0; i<num; i++) {
		cin >> n;
		if (q[0]<n)
			q[0] = n;
		else if (q[1]<n)
			q[1] = n;
		else
			break;
	}

	if (i==num)
		return true;
	else
		return false;
}

int main(){
	int lines;

	cin >> lines;
	for (i=0; i<lines; i++) {
		if (judge(10))
			cout << "NO\n";
		else
			cout << "YES\n";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:14: error: 'i' was not declared in this scope
   28 |         for (i=0; i<lines; i++) {
      |              ^
Language: C++

#include <iostream>

using namespace std;

bool judge(int num){
	int i, n, q[2]={0,0};

	for (i=0; i<num; i++) {
		cin >> n;
		if (q[0]<n)
			q[0] = n;
		else if (q[1]<n)
			q[1] = n;
		else
			break;
	}

	return ((i==num)? true: false);
}

int main(){
	int i, n;

	cin >> n;
	for (i=0; i<n; i++)
		cout << (jedge(10)? "YES": "NO") << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:26: error: 'jedge' was not declared in this scope; did you mean 'judge'?
   26 |                 cout << (jedge(10)? "YES": "NO") << endl;
      |                          ^~~~~
      |                          judge
Language: C++

#include <iostream>

using namespace std;

int main(void) {
    int N, a, b, c;
    cin >> N;
    for (; N--; ) {
        b = c = 0;
        bool ok = true;
        for (int i = 0; i < 10; i++) {
            cin >> a;
            if (a > b) {
                b = a;
            } else if (a > c) {
                c = a;
            } else {
                ok = false;
                break;
            }
        }
        if (ok) cout << "YES" << endl;
        else cout << "NO" endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:26: error: expected ';' before 'endl'
   23 |         else cout << "NO" endl;
      |                          ^~~~~
      |                          ;
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InpurtStreamReader(System.in));
String line;
int[] l=new int[11];
l[0]=0;
while((line=br.readLine())!=null){
String[] value=line.split(",");
for(int i=0;i<10;i++){
l[i+1]=l[i]+Integer.parseInt(value[i]);
}
v1=Ineger.parseInt(value[10]);
v2=Integer.parseInt(value[11]);
double d=l[10]*v1/(v1+v2);
for(int i=0;i<10;i++){
if(l[i+1]>=d){
System.out.println(i+1);
break;
}
}
}
}
}

Compiler output:
Main.java:5: error: cannot find symbol
BufferedReader br=new BufferedReader(new InpurtStreamReader(System.in));
                                         ^
  symbol:   class InpurtStreamReader
  location: class Main
Main.java:14: error: cannot find symbol
v1=Ineger.parseInt(value[10]);
^
  symbol:   variable v1
  location: class Main
Main.java:14: error: cannot find symbol
v1=Ineger.parseInt(value[10]);
   ^
  symbol:   variable Ineger
  location: class Main
Main.java:15: error: cannot find symbol
v2=Integer.parseInt(value[11]);
^
  symbol:   variable v2
  location: class Main
Main.java:16: error: cannot find symbol
double d=l[10]*v1/(v1+v2);
               ^
  symbol:   variable v1
  location: class Main
Main.java:16: error: cannot find symbol
double d=l[10]*v1/(v1+v2);
                   ^
  symbol:   variable v1
  location: class Main
Main.java:16: error: cannot find symbol
double d=l[10]*v1/(v1+v2);
                      ^
  symbol:   variable v2
  location: class Main
7 errors
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
int[] l=new int[11];
l[0]=0;
while((line=br.readLine())!=null){
String[] value=line.split(",");
for(int i=0;i<10;i++){
l[i+1]=l[i]+Integer.parseInt(value[i]);
}
int v1=Ineger.parseInt(value[10]);
int v2=Integer.parseInt(value[11]);
double d=l[10]*v1/(v1+v2);
for(int i=0;i<10;i++){
if(l[i+1]>=d){
System.out.println(i+1);
break;
}
}
}
}
}

Compiler output:
Main.java:14: error: cannot find symbol
int v1=Ineger.parseInt(value[10]);
       ^
  symbol:   variable Ineger
  location: class Main
1 error
Language: Java

import java.util.Scanner;

class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		double v1, v2;
		int d;
		double t;
		String[] s;
		int[] a;
		int sum;
		
		while(scan.hasNext()){
			s = scan.next().split(",");
			a = new int[11];
			sum = 0;
			
			for(int i = 0; i < 10; i++){
				a[i]=Integer.parseInt(s[i]);
				sum += a[i];
			}
			
			v1 = Double.parseDouble(s[10]);
			v2 = Double.parseDouble(s[11]);
			d = 0;
			
			for(int i = 0; i < 10; i++){
				d += a[i];
				t = d / v1;
				if(d + t*v2 >= sum){
					System.out.println( i + 1);
					break;
				}
			}
		}
	}

Compiler output:
Main.java:38: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in)
							.useDelimiter("[,\\s]+");

	public static void main(String[] args){
		int[] l = new int[10];
		int sum1 = 0, sum2 = 0;
		double time = 0, tX = 0;
		while(scan.hasNext()){
			for(int i = 0; i < 10; i++){
				l[i] = scan.nextInt();
			}
			int v1 = scan.nextInt();
			int v2 = scan.nextInt();
			for(int i = 0; i < 10; i++){
				sum1 += l[i];
			}
			time =(double) (sum1 / (v2 + v1));
			tx =(double) v1 * time;
			for(int i = 0; i < 10; i++){
				sum2 += l[i];
				if(tx <= sum2){
					System.out.printf("%d\n", i+1);
					sum1 = 0;
					sum2 = 0;
					break;
				}
			}
		}
	}
}

Compiler output:
Main.java:21: error: cannot find symbol
			tx =(double) v1 * time;
			^
  symbol:   variable tx
  location: class Main
Main.java:24: error: cannot find symbol
				if(tx <= sum2){
				   ^
  symbol:   variable tx
  location: class Main
2 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in)
							.useDelimiter("[,\\s]+");

	public static void main(String[] args){
		int[] l = new int[10];
		int sum1 = 0, sum2 = 0;
		double time = 0, tX = 0;
		while(scan.hasNext()){
			for(int i = 0; i < 10; i++){
				l[i] = scan.nextInt();
			}
			int v1 = scan.nextInt();
			int v2 = scan.nextInt();
			for(int i = 0; i < 10; i++){
				sum1 += l[i];
			}
			time =(double) sum1 / (double)(v2 + v1));
			tX =(double) v1 * time;
			for(int i = 0; i < 10; i++){
				sum2 += l[i];
				if(tX <= sum2){
					System.out.printf("%d\n", i+1);
					sum1 = 0;
					sum2 = 0;
					break;
				}
			}
		}
	}
}

Compiler output:
Main.java:20: error: ';' expected
			time =(double) sum1 / (double)(v2 + v1));
			                                       ^
1 error
Language: C

#include<iostream>

#define loop(i,a,b) for(int i = a; i < b; i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(void){
	int l[10];
	int v[2];
	char tmp;
	double x;
	while(cin>>l[0]){
		cin>>tmp;
		loop(i,1,10)cin>>l[i]>>tmp;
		cin>>v[0]>>tmp>>v[1];
		
		int sum = 0;
		rep(i,10)sum+=l[i];
		
		x = sum * v[0]/(v[0] + v[1]);
		
		sum = 0;
		int cnt=0;
		rep(i,10){
			sum+=l[i];
			cnt++;
			if(sum>=x){
				cout<<cnt<<endl;
				break;
			}		
		}
	}

}

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

#include<stdio.h>
int main(void)
{
	int kukan[10], a1, a2, sum, i, sure, surea;
	while(1){
		scanf( "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,", &kukan[0], &kukan[1], &kukan[2], &kukan[3], &kukan[4], &kukan[5],
		                                               &kukan[6], &kukan[7], &kukan[8], &kukan[9], &a1, &a2 );
		sum = 0;
		for(i = 0; i < 10; i++){
			sum += kukan[i];
		}
		sure = sum * a1 / (a1 + a2);
		surea = sum * a1 % (a1 + a2);
		sum = 0;
		for(i = 0 ; i < 10; i++){
			sum += kukan[i];
			if(sure < sum) break;
			else if(sure == sum) {
				if(kukan[i] > kukan[i+1] || surea > 0)
					i = i + 1;
				break;
			}
		}
			printf( "%d\n", i + 1 );
	}

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

#include<stdio.h>
int main(void)
{
	int kukan[10], a1, a2, sum, i, sure, surea, kai;
	for( kai = 0; kai < 3; kai++){
		scanf( "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,", &kukan[0], &kukan[1], &kukan[2], &kukan[3], &kukan[4], &kukan[5],
		                                               &kukan[6], &kukan[7], &kukan[8], &kukan[9], &a1, &a2 );
		sum = 0;
		for(i = 0; i < 10; i++){
			sum += kukan[i];
		}
		sure = sum * a1 / (a1 + a2);
		surea = sum * a1 % (a1 + a2);
		sum = 0;
		for(i = 0 ; i < 10; i++){
			sum += kukan[i];
			if(sure < sum) break;
			else if(sure == sum) {
				if(kukan[i] > kukan[i+1] || surea > 0)
					i = i + 1;
				break;
			}
		}
			printf( "%d\n", i + 1 );
	}

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

#include<stdio.h>
int main(void)
{
	int kukan[10], a1, a2, sum, i, sure, surea, kai;
	while(1){
		scanf( "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,", &kukan[0], &kukan[1], &kukan[2], &kukan[3], &kukan[4], &kukan[5],
		                                               &kukan[6], &kukan[7], &kukan[8], &kukan[9], &a1, &a2 );
		sum = 0;
		for(i = 0; i < 10; i++){
			sum += kukan[i];
		}
		sure = sum * a1 / (a1 + a2);
		surea = sum * a1 % (a1 + a2);
		sum = 0;
		for(i = 0 ; i < 10; i++){
			sum += kukan[i];
			if(sure < sum) break;
			else if(sure == sum) {
				if(kukan[i] > kukan[i+1] || surea > 0)
					i = i + 1;
				break;
			}
		}
			printf( "%d\n", i + 1 );
	}
	
	return 0;

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

#include <stdio.h>

int main()
{
    double L[10];
    double V1, V2;
    double meet_pos;
    double railway_lenth;
    double cnt1, cnt2;
    int output[50];
    
    cnt2 = 0;
    while(1)
	{
    	if(scanf("%lf,", &L[0]) == EOF)
    	{
			break;
		}
    	for(cnt1 = 1; cnt1 < 10; cnt1++)
    	{
			scanf("%lf,", &L[cnt1]);
		}
		scanf("%lf,%lf", &V1, &V2);
    	
    	railway_lenth = 0;
    	for(cnt1 = 0; cnt1 < 10; cnt1++)
    	{
			railway_lenth += L[cnt1];
		}
    	meet_pos = railway_lenth * V1 / (V1 + V2)
    	
    	cnt1 = 0;
    	railway_lenth = 0;
    	while(railway_lenth <= meet_pos)
    	{
			railway_lenth += L[cnt1];
			cnt1++;
    	}
    	output[cnt2] = cnt1;
    	cnt2++;
    }
	
    return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:21:41: error: array subscript is not an integer
   21 |                         scanf("%lf,", &L[cnt1]);
      |                                         ^
main.c:28:43: error: array subscript is not an integer
   28 |                         railway_lenth += L[cnt1];
      |                                           ^
main.c:30:50: error: expected ';' before 'cnt1'
   30 |         meet_pos = railway_lenth * V1 / (V1 + V2)
      |                                                  ^
      |                                                  ;
   31 | 
   32 |         cnt1 = 0;
      |         ~~~~                                      
main.c:36:43: error: array subscript is not an integer
   36 |                         railway_lenth += L[cnt1];
      |                                           ^
main.c:39:15: error: array subscript is not an integer
   39 |         output[cnt2] = cnt1;
      |               ^
Language: C

#include <stdio.h>

int main()
{
    double L[10];
    double V1, V2;
    double meet_pos;
    double railway_lenth;
    int cnt1, cnt2;
    int output[50];
    
    cnt2 = 0;
    while(1)
	{
    	if(scanf("%lf,", &L[0]) == EOF)
    	{
			break;
		}
    	for(cnt1 = 1; cnt1 < 10; cnt1++)
    	{
			scanf("%lf,", &L[cnt1]);
		}
		scanf("%lf,%lf", &V1, &V2);
    	
    	railway_lenth = 0;
    	for(cnt1 = 0; cnt1 < 10; cnt1++)
    	{
			railway_lenth += L[cnt1];
		}
    	meet_pos = railway_lenth * V1 / (V1 + V2)
    	
    	cnt1 = 0;
    	railway_lenth = 0;
    	while(railway_lenth <= meet_pos)
    	{
			railway_lenth += L[cnt1];
			cnt1++;
    	}
    	output[cnt2] = cnt1;
    	cnt2++;
    }
	
    return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:30:50: error: expected ';' before 'cnt1'
   30 |         meet_pos = railway_lenth * V1 / (V1 + V2)
      |                                                  ^
      |                                                  ;
   31 | 
   32 |         cnt1 = 0;
      |         ~~~~
Language: C

#include <stdio.h>

int main()
{
    double L[10];
    double V1, V2;
    double meet_pos;
    double railway_lenth;
    int cnt1, cnt2;
    int output[50];
    
    cnt2 = 0;
    while(1)
	{
    	if(scanf("%lf,", &L[0]) == EOF)
    	{
			break;
		}
    	for(cnt1 = 1; cnt1 < 10; cnt1++)
    	{
			scanf("%lf,", &L[cnt1]);
		}
		scanf("%lf,%lf", &V1, &V2);
    	
    	railway_lenth = 0;
    	for(cnt1 = 0; cnt1 < 10; cnt1++)
    	{
			railway_lenth += L[cnt1];
		}
    	meet_pos = railway_lenth * V1 / (V1 + V2);
    	
    	cnt1 = 0;
    	railway_lenth = 0;
    	while(railway_lenth <= meet_pos)
    	{
			railway_lenth += L[cnt1];
			cnt1++;
    	}
    	output[cnt2] = cnt1;
    	cnt2++;
    }
    
    for(cnt1 = 0; cnt1 < cnt2; cnt1++)
    {
		printf("%d\n", output[cnt1])
	}
    
    
	
    return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:45:45: error: expected ';' before '}' token
   45 |                 printf("%d\n", output[cnt1])
      |                                             ^
      |                                             ;
   46 |         }
      |         ~
Language: C

#include <stdio.h>
main(){
  int n[10],a,b,i,nsum,m;
  while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4],&n[5],&n[6],&n[7],&n[8],&n[9],&a,&b) !=EOF){
    double t=0,x;
    nsum=0;
   for(i=0;i<10;i++){#include <stdio.h>
main(){
  int n[10],a,b,i,nsum,m;
  while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4],&n[5],&n[6],&n[7],&n[8],&n[9],&a,&b) !=EOF){
    double t=0,x;
    nsum=0;
   for(i=0;i<10;i++){
     nsum+=n[i];
   }
   t=nsum/(double)(a+b);
   x=t*(double)a;
   m=0;
   for(i=0;i<10;i++){
     if((double)x-m>0&&(double)x-m<n[i]){
       i++;
       break;
     }
     else if(x-m==0) break;
     else m+=n[i];
   }
   printf("%d\n",i);

  }
  return 0; 
}

     nsum+=n[i];
   }
   t=nsum/(double)(a+b);
   x=t*(double)a;
   m=0;
   for(i=0;i<10;i++){
     if((double)x-m>0&&(double)x-m<n[i]){
       i++;
       break;
     }
     else if(x-m==0) break;
     else m+=n[i];
   }
   printf("%d\n",i);

  }
  return 0; 
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:7:22: error: stray '#' in program
    7 |    for(i=0;i<10;i++){#include <stdio.h>
      |                      ^
main.c:7:23: error: 'include' undeclared (first use in this function)
    7 |    for(i=0;i<10;i++){#include <stdio.h>
      |                       ^~~~~~~
main.c:7:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:32: error: 'stdio' undeclared (first use in this function); did you mean 'stdin'?
    7 |    for(i=0;i<10;i++){#include <stdio.h>
      |                                ^~~~~
      |                                stdin
main.c:8:7: error: expected ';' before '{' token
    8 | main(){
      |       ^
      |       ;
Language: C

#include <stdio.h>
main(){
  int n[10],a,b,i,nsum,m;
  while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4],&n[5],&n[6],&n[7],&n[8],&n[9],&a,&b) !=EOF){
    double t=0,x;
    nsum=0;
   for(i=0;i<10;i++){
     nsum+=n[i];
   }
   t=nsum/(double)(a+b);
   x=t*(double)a;
   m=0;
   for(i=0;i<10;i++){
     if((double)x-m>0&&(double)x-m<n[i]){
       i++;
       break;
     }
     else if(x-m==0) break;
     else m+=n[i];
   }
   printf("%d\n",i);

  }
  return 0; 
}

     nsum+=n[i];
   }
   t=nsum/(double)(a+b);
   x=t*(double)a;
   m=0;
   for(i=0;i<10;i++){
     if((double)x-m>0&&(double)x-m<n[i]){
       i++;
       break;
     }
     else if(x-m==0) break;
     else m+=n[i];
   }
   printf("%d\n",i);

  }
  return 0; 
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c:27:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+=' token
   27 |      nsum+=n[i];
      |          ^~
main.c:28:4: error: expected identifier or '(' before '}' token
   28 |    }
      |    ^
main.c:29:4: warning: data definition has no type or storage class
   29 |    t=nsum/(double)(a+b);
      |    ^
main.c:29:4: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
main.c:29:6: error: 'nsum' undeclared here (not in a function)
   29 |    t=nsum/(double)(a+b);
      |      ^~~~
main.c:29:20: error: 'a' undeclared here (not in a function)
   29 |    t=nsum/(double)(a+b);
      |                    ^
main.c:29:22: error: 'b' undeclared here (not in a function)
   29 |    t=nsum/(double)(a+b);
      |                      ^
main.c:30:4: warning: data definition has no type or storage class
   30 |    x=t*(double)a;
      |    ^
main.c:30:4: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
main.c:31:4: warning: data definition has no type or storage class
   31 |    m=0;
      |    ^
main.c:31:4: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
main.c:32:4: error: expected identifier or '(' before 'for'
   32 |    for(i=0;i<10;i++){
      |    ^~~
main.c:32:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   32 |    for(i=0;i<10;i++){
      |             ^
main.c:32:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   32 |    for(i=0;i<10;i++){
      |                  ^~
main.c:40:11: error: expected declaration specifiers or '...' before string constant
   40 |    printf("%d\n",i);
      |           ^~~~~~
main.c:40:18: error: unknown type name 'i'
   40 |    printf("%d\n",i);
      |                  ^
main.c:42:3: error: expected identifier or '(' before '}' token
   42 |   }
      |   ^
main.c:43:3: error: expected identifier or '(' before 'return'
   43 |   return 0;
      |   ^~~~~~
main.c:44:1: error: expected identifier or '(' before '}' token
   44 | }
      | ^
Language: C

#include<stdio.h>

int main()
{
	int v1,v2;
	int dist[10];
	int dist0to10;
	int i,station;
	double intersect,tmp;

	while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%

d",dist,dist+1,dist+2,dist+3,dist+4,dist+5,dist+6,dist+7,dist+8,dist+9,&v1,&v2)!=EOF)
	{
		dist0to10=0;
		tmp=0;
		for(i=0;i<10;i++)
		{
			dist0to10+=dist[i];
		}

		intersect=(double)(v1*dist0to10)/(v1+v2);
		
		printf("%lf ",intersect);
		
		for(i=0;i<10;i++)
		{
			tmp+=(double)dist[i];
			if(tmp>=intersect)
			{
				station=i+1;
				break;
			}
		}
		printf("%d\n",station);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:21: warning: missing terminating " character
   11 |         while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%
      |                     ^
main.c:11:21: error: missing terminating " character
   11 |         while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:13:2: warning: missing terminating " character
   13 | d",dist,dist+1,dist+2,dist+3,dist+4,dist+5,dist+6,dist+7,dist+8,dist+9,&v1,&v2)!=EOF)
      |  ^
main.c:13:2: error: missing terminating " character
   13 | d",dist,dist+1,dist+2,dist+3,dist+4,dist+5,dist+6,dist+7,dist+8,dist+9,&v1,&v2)!=EOF)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:13:1: error: 'd' undeclared (first use in this function)
   13 | d",dist,dist+1,dist+2,dist+3,dist+4,dist+5,dist+6,dist+7,dist+8,dist+9,&v1,&v2)!=EOF)
      | ^
main.c:13:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:2: error: expected ')' before '{' token
   13 | d",dist,dist+1,dist+2,dist+3,dist+4,dist+5,dist+6,dist+7,dist+8,dist+9,&v1,&v2)!=EOF)
      |  ^
      |  )
   14 |         {
      |         ~
main.c:11:20: note: to match this '('
   11 |         while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%
      |                    ^
main.c:37:18: error: expected ')' before '}' token
   37 |         return 0;
      |                  ^
      |                  )
   38 | }
      | ~                 
main.c:11:14: note: to match this '('
   11 |         while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%
      |              ^
main.c:38:1: error: expected expression before '}' token
   38 | }
      | ^
Language: C

#include<stdio.h>

int main()
{
	int v1,v2;
	int dist[10];
	int dist0to10;
	int i,station;
	double intersect,tmp;

	while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%

d",dist,dist+1,dist+2,dist+3,dist+4,dist+5,dist+6,dist+7,dist+8,dist+9,&v1,&v2)!=EOF)
	{
		dist0to10=0;
		tmp=0;
		for(i=0;i<10;i++)
		{
			dist0to10+=dist[i];
		}

		intersect=(double)(v1*dist0to10)/(v1+v2);
		

		for(i=0;i<10;i++)
		{
			tmp+=(double)dist[i];
			if(tmp>=intersect)
			{
				station=i+1;
				break;
			}
		}
		printf("%d\n",station);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:21: warning: missing terminating " character
   11 |         while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%
      |                     ^
main.c:11:21: error: missing terminating " character
   11 |         while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:13:2: warning: missing terminating " character
   13 | d",dist,dist+1,dist+2,dist+3,dist+4,dist+5,dist+6,dist+7,dist+8,dist+9,&v1,&v2)!=EOF)
      |  ^
main.c:13:2: error: missing terminating " character
   13 | d",dist,dist+1,dist+2,dist+3,dist+4,dist+5,dist+6,dist+7,dist+8,dist+9,&v1,&v2)!=EOF)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:13:1: error: 'd' undeclared (first use in this function)
   13 | d",dist,dist+1,dist+2,dist+3,dist+4,dist+5,dist+6,dist+7,dist+8,dist+9,&v1,&v2)!=EOF)
      | ^
main.c:13:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:2: error: expected ')' before '{' token
   13 | d",dist,dist+1,dist+2,dist+3,dist+4,dist+5,dist+6,dist+7,dist+8,dist+9,&v1,&v2)!=EOF)
      |  ^
      |  )
   14 |         {
      |         ~
main.c:11:20: note: to match this '('
   11 |         while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%
      |                    ^
main.c:36:18: error: expected ')' before '}' token
   36 |         return 0;
      |                  ^
      |                  )
   37 | }
      | ~                 
main.c:11:14: note: to match this '('
   11 |         while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%
      |              ^
main.c:37:1: error: expected expression before '}' token
   37 | }
      | ^
Language: C++

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

int main()
{
    int l[10] , v1 , v2 , n , cnt;
    double d , t;
    char ch;
    while(cin(>>l[0]>>ch>>l[1]>>ch>>l[2]>>ch>>l[3]>>ch>>l[4]>>ch>>l[5]>>ch>>l[6]>>ch>>l[7]>>ch>>l[8]>>ch>>l[9]>>ch>>v1>>ch>>v2) !=EOF){
        n=0;
        for(int i=0;i<10;i++){
            n+=l[i];
        }
        t=n/(v1+v2);
        d=v1*t;    //列車1の動く距離
        cnt=0;
        while(d>0){
            d -= l[cnt];
            cnt++;
        }
        cout << cnt << endl;
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected primary-expression before '>>' token
   10 |     while(cin(>>l[0]>>ch>>l[1]>>ch>>l[2]>>ch>>l[3]>>ch>>l[4]>>ch>>l[5]>>ch>>l[6]>>ch>>l[7]>>ch>>l[8]>>ch>>l[9]>>ch>>v1>>ch>>v2) !=EOF){
      |               ^~
Language: C++

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String str;
		
		while((str = reader.readLine()) != null){
			String[] code = str.split(",",0);
			int sum = 0;
			
			int[] station = new int[12];
			for(int i = 0; i < 10; i++){
				station[i] = Integer.parseInt(code[i]);
				sum += station[i];
			}
			int v1 = Integer.parseInt(code[10]);
			int v2 = Integer.parseInt(code[11]);
			double x = 0,s = 0;
			for(int i = 0; i < 10; i++){
				x += station[i];
				s = x / v1;
				if(x + s * v2 >= sum){
					System.out.println(i + 1);
					break;
				}
				}
			}
		reader.close();
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:15: error: expected ':' before 'static'
    6 |         public static void main(String[] args)throws IOException{
      |               ^~~~~~~
      |               :
a.cc:6:33: error: 'String' has not been declared
    6 |         public static void main(String[] args)throws IOException{
      |                                 ^~~~~~
a.cc:6:42: error: expected ',' or '...' before 'args'
    6 |         public static void main(String[] args)throws IOException{
      |                                          ^~~~
a.cc:6:46: error: expected ';' at end of member declaration
    6 |         public static void main(String[] args)throws IOException{
      |                                              ^
      |                                               ;
a.cc:6:47: error: 'throws' does not name a type
    6 |         public static void main(String[] args)throws IOException{
      |                                               ^~~~~~
a.cc:33:2: error: expected ';' after class definition
   33 | }
      |  ^
      |  ;
Language: C++

$<.map{|i|*a,b,c=i.split(?,).map(&:to_f);s=0;p a.index{|j|(s+=j)>=a.reduce(:+)*b/(b+c)}+1}

Compiler output:
a.cc:1:1: error: '$' does not name a type
    1 | $<.map{|i|*a,b,c=i.split(?,).map(&:to_f);s=0;p a.index{|j|(s+=j)>=a.reduce(:+)*b/(b+c)}+1}
      | ^
Language: C++

#include <cstdio>
using namespace std;

#define SIZE 10
#define scanf scanf_s

int main() {
	int l[SIZE] = { 0 }, v1, v2;
	double s;
	char t;
	while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2) != EOF) {
		s = 0;
		for (int i = 0; i < SIZE; i++) {
			s += l[i];
		}
		s = s * v1 / (v1 + v2);

		for (int i = 0; i < 10; i++) {
			s -= l[i];
			if (s <= 0) {
				printf("%d\n", i + 1);
				break;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    5 | #define scanf scanf_s
      |               ^~~~~~~
a.cc:11:16: note: in expansion of macro 'scanf'
   11 |         while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2) != EOF) {
      |                ^~~~~
Language: C++

#include <iostream>
#include <numeric>

int main()
{
	int lengthes[10];
	char tmp;
	while (std::cin >> lengthes[0] >> tmp >> lengthes[1] >> tmp >> lengthes[2] >> tmp >> lengthes[3] >> tmp >> lengthes[4] >> tmp >> lengthes[5] >> tmp >> lengthes[6] >> tmp >> lengthes[7] >> tmp >> lengthes[8] >> tmp >> lengthes[9] >> tmp )
	{
		int v1, v2;
		std::cin >> v1 >> tmp >> v2;

		int sum = std::accumulate(lengthes[0], lengthes[10], 0);

		double sec = (double)(sum) / (v1 + v2);
		double dist = v1 + sec;

		int all = 0;
		int index = 1;
		for (auto length : lengthes)
		{
			all += length;
			if (dist < all)
			{
				std::cout << index << std::endl;
				break;
			}
			index++;
		}
	}

	return 0;
}

Compiler output:
In file included from /usr/include/c++/14/numeric:62,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_numeric.h: In instantiation of '_Tp std::accumulate(_InputIterator, _InputIterator, _Tp) [with _InputIterator = int; _Tp = int]':
a.cc:13:28:   required from here
   13 |                 int sum = std::accumulate(lengthes[0], lengthes[10], 0);
      |                           ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:141:48: error: invalid type argument of unary '*' (have 'int')
  141 |         __init = _GLIBCXX_MOVE_IF_20(__init) + *__first;
      |                                                ^~~~~~~~
Language: C++

#include<iostream>
#include<stdio.h>
#include<vector>
int main(){
  int dis[10];int speed[2];vector<int> answers;
  while(scanf("%d,%d,%d,%d,%d,%d.%d,%d,%d,%d,%d,%d",&dis[0],&dis[1],&dis[2],&dis[3],&dis[4],&dis[5],&dis[6],&dis[7],&dis[8],&dis[9],&speed[0],&speed[1])!=EOF){
    int all=0;
    for(int i=0;i<10;i++){
      all+=dis[i];
    }
    double addtion_speed=speed[0]+speed[1];
    double same_time=all/addtion_spedd;
    double same_dis=speed[0]*same_time;
    double add_dis=0;
    int j=0;
    while(same_dis>add_dis){
      add_dis+=dis[j];
      j++;
    }
    if(same_dis==add_dis)j--;
    answers.push_back(j);
  }
  for(int i=0;i<answers.size();i++){
    cout<<answers[i]<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:28: error: 'vector' was not declared in this scope
    5 |   int dis[10];int speed[2];vector<int> answers;
      |                            ^~~~~~
a.cc:5:28: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:5:35: error: expected primary-expression before 'int'
    5 |   int dis[10];int speed[2];vector<int> answers;
      |                                   ^~~
a.cc:12:26: error: 'addtion_spedd' was not declared in this scope; did you mean 'addtion_speed'?
   12 |     double same_time=all/addtion_spedd;
      |                          ^~~~~~~~~~~~~
      |                          addtion_speed
a.cc:21:5: error: 'answers' was not declared in this scope
   21 |     answers.push_back(j);
      |     ^~~~~~~
a.cc:23:17: error: 'answers' was not declared in this scope
   23 |   for(int i=0;i<answers.size();i++){
      |                 ^~~~~~~
a.cc:24:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |     cout<<answers[i]<<endl;
      |     ^~~~
      |     std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:24:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   24 |     cout<<answers[i]<<endl;
      |                       ^~~~
      |                       std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <cstdio>
int main(){
int l[11],v1,v2;for(;~scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2);printf("%d\n",i+1))for(int i=0;i<10;i++){l[i]+=l[i-1];if(l[i]>=l[9]*(v1/((double)v1+v2)))break;}}}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:150: error: 'i' was not declared in this scope
    3 | int l[11],v1,v2;for(;~scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2);printf("%d\n",i+1))for(int i=0;i<10;i++){l[i]+=l[i-1];if(l[i]>=l[9]*(v1/((double)v1+v2)))break;}}}
      |                                                                                                                                                      ^
a.cc: At global scope:
a.cc:3:233: error: expected declaration before '}' token
    3 | int l[11],v1,v2;for(;~scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2);printf("%d\n",i+1))for(int i=0;i<10;i++){l[i]+=l[i-1];if(l[i]>=l[9]*(v1/((double)v1+v2)))break;}}}
      |                                                                                                                                                                                                                                         ^
Language: C++

#include <cstdio>
using namespace std;

int main(){
	int l[12], v1, v2;
	double sum,sum2;

	while( scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
	&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&l[10],&v1,&v2) != EOF ){

	        sum = 0;
		for(int i=1 ; i<=10 ; i++){
			sum += l[i];
		}
		sum2 = ((double)sum)/(double)((v1+v2))*(double)(v1);
		sum = 0;
		for(int i=1 ; i<=10 ; i++){
			sum += k[i];
			if( sum <= sum2 ){
				printf("%d\n", i);
				break;
			}
		}
	}
        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:32: error: 'k' was not declared in this scope
   18 |                         sum += k[i];
      |                                ^
Language: C++

#include <stdio.h>

int main(){
double v1,v2,t,x;
int a[10],i;
while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%lf,%lf",&a[0],&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],&a[7],&a[8],&a[9],&v1,&v2)!=EOF){
x=0;
for(i=0,i<10;i++){
x+=a[i];
}
t=(v1)/(v1+v2);
x=x*t;
for(i=0;x>0;i++){
x-=a[i];
}
printf("%d\n",i+1);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before ')' token
    8 | for(i=0,i<10;i++){
      |                 ^
      |                 ;
Language: C++

#include<iostream>
#include<vector>

int main(){
	int first;
	while(std::cin>>first){
		std::vector<int> distance(10);
		distance[0]=first;
		int sum=0;
		char dummy;
		sum+=first;
		for(int i=1;i<10;++i){
			std::cin>>dummy;
			int s;
			std::cin>>s;
			sum+=s;
			a+=s;
			distance[i]=a;
		}
		double v1,v2;
		std::cin>>dummy>>v1>>dummy>>v2;
		int ans=0;
		for(int i=0;i<10;++i){
			if(distance[i]<=sum/(v1+v2)*v1){
				ans=i+1;
			}
		}
		std::cout<<ans<<std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 'a' was not declared in this scope
   17 |                         a+=s;
      |                         ^