Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	a := make([]float64, 10)
	for scanner.Scan() {
		info := strings.Split(scanner.Text(), ",")
		for j := 0; j < 10; j++ {
			a[j], _ = strconv.ParseFloat(info[j], 64)
		}
		v1, _ := strconv.ParseFloat(info[10], 64)
		v2, _ := strconv.ParseFloat(info[11], 64)
		sum := 0.0
		for i := 0; i < 10; i++ {
			sum += a[i]
		}
		match := v1 * ((sum/(v1+v2)))
		if match == 0 {
			fmt.Println(1)
		} else {
			sum = 0
			for k := 0; k < 10; k++ {
				sum += a[k]
				if match <= sum {
					fmt.Println(k+1)
					break
				}
			}
		}
	}
}

C++: #include<iostream>
#include<cstdio>

using namespace std;

int main(){
  int i;
  long double closs, l[11], v[2], sum_len = 0.0,t[2][12]={};
  while(scanf("%Lf,",&l[1])!=EOF){
    sum_len=l[1];
    for(i=2;i<11;i++) {scanf("%Lf,",&l[i]);sum_len+=l[i];}
    scanf("%Lf,%Lf",&v[0],&v[1]);
    closs=sum_len/(v[0]+v[1]);
    long double sum_time[2]={};
    for(i=1;i<11;i++){
      t[0][i]=sum_time[0]+(l[i]/v[0]);
      t[1][11-i]=sum_time[1]+l[11-i]/v[1];
      sum_time[0]+=l[i]/v[0];
      sum_time[1]+=l[12-i]/v[1];
    }
    for(i=0;i<12;i++){
      if(t[0][i] >= closs && t[1][i] <= closs){cout<<i<<endl; break;}
    }
  }
  return 0;
}

C++: #include <stdio.h>
int a[10], v1, v2;
int main() {
	while(~scanf("%d", &a[0])) {
		for(int i = 1; i < 10; i++) scanf(",%d", &a[i]);
		scanf(",%d,%d", &v1, &v2);
		double sum = 0, r = 0;
		for(int i = 0; i < 10; i++) sum += a[i];
		sum = sum * v1 / (v1 + v2);
		for(int i = 0; i < 10; i++) {
			r += a[i];
			if(sum <= r) {
				printf("%d\n", i + 1); break;
			}
		}
	}
	return 0;
}

C++: #define _crt_secure_no_warnings

#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif


#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;

int main()
{
	int a[12];
	char c;
	while (1)
	{
		int sum = 0;
		for (size_t i = 0; i < 12; i++)
		{
			if (cin >> a[i])
			{
				if (i != 11)cin >> c;
				if (i < 10)
				{
					sum += a[i];
				}
			} else
			{
				return 0;
			}
		}
		double x;
		x = (double)a[10] / (double)(a[10] + a[11]);
		x *= sum;
		int i = 0;
		while (x > 0)
		{
			x -= a[i];
			i++;
		}
		cout << i << endl;
	}
	return 0;
}

C++: #include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
  vector<int> l(10);
  int v1, v2;
  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) {
    vector<double> ll(10);
    ll[0] = l[0];
    for (int i = 1; i < 10; ++i)
      ll[i] = ll[i-1] + l[i];

    double t = ll.back() / static_cast<double>(v1+v2);
    double d = t * v1;
    for (int i = 0; i < ll.size(); ++i) {
      if (d <= ll[i]) {
	printf("%d\n", i+1);
	break;
      }
    }
  }
  return 0;
}

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

int pow(int a,int n){
	if(n <= 0){
		return 1;
	}
	return a * pow(a,n - 1);
}

int main(){
	int v1,v2;
	int a[10];
	int sum1;
	int sum2;
	int ans = 0;
	while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],&a[7],&a[8],&a[9],&v1,&v2) != EOF){
		sum1 = 0;
		sum2 = 0;
		for(int i = 0; i < 10; i++){
			sum1 += a[i];
		}
		for(int i = 0; i < 10; i++){
			sum2 += a[i];
			if(sum1 * v1 > sum2 * (v1 + v2)){
				ans = i + 2;
			}
		}
		printf("%d\n",ans);
	}
	///////////////////////////////////
	//Sleep(200000);///////////////////// 提出するときは必ず外す！
	///////////////////////////////////
	return 0;

}

C++: #include <iostream>
#include <cstdio>

using namespace std;

int main() {
	int l[10];
	double v1, v2;
	while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%lf,%lf", &l[0], &l[1], &l[2], &l[3], &l[4], &l[5], &l[6], &l[7], &l[8], &l[9], &v1, &v2) != EOF) {
		int distance = 0;
		for (int i = 0; i < 10; i++)
			distance += l[i];
//		cout << distance << endl;
		double time = distance / (v1 + v2);
//		printf("%.6lf\n", time);
		double cross = v1 * time;
//		printf("%.6lf\n", cross);
		double sum = 0;
		for (int i = 0; i < 10; i++) {
			sum += l[i];
			if (sum >= cross) {
				cout << i+1 << endl;
				break;
			}
		}
	}
	return 0;
}

C++: #include <iostream>
#include <cstdlib>
using namespace std;

int main() {
  int l[11],v1,v2;
  double time1[11],time2[11];
  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) == 12) {
    //for(int i=1;i<11;i++) {
    //cout << l[i] << endl;}
    double time1[11] = {0};
    double time2[11] = {0};
    for(int i=1;i<11;i++) {
      for(int j=0;j<i;j++) {
        time1[i] += ((double)l[j+1]) / v1;
        time2[10-i] += ((double)l[10-j]) / v2;
      }
      //  cout << time1[i] << " " << time2[10-i] << endl;
    }


        for(int i=0;i<10;i++) {
    if((time1[i] < time2[i]) && (time1[i+1] > time2[i+1]))
        cout << i+1 << endl;
    else if(time1[i] == time2[i])
      cout << i << endl;
    }
  }
}

C++:  
 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 
 using namespace std;
  
 int main()
 {
   int N;
   int arr[10];
   int v1,v2;
   while(cin>>arr[0])
   {
     double sum=arr[0];
     double sum2=0;
     for(int i=1;i<10;i++)
     {
       cin>>arr[i];
       sum+=arr[i];
     }
     cin>>v1>>v2;
     int result;
     double dis=1.0*v1/(v1+v2)*sum;
     for(int i=0;i<10;i++)
     {
       sum2+=arr[i];
       if(dis<=sum2)
       { 
         result=i+1;
         break;
       }           
     }
     cout<<result<<endl;  
   }
   //while(1);     
   return 0; 
 }

C++: #include<iostream>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) loop(i,0,b)
using namespace std;
int main(){
  int in[10];
  int p;
  while(cin>>p){
    in[0]=p*100;
    int a,b;
    int suma=0,sumb;
    char d;
    cin>>d;
    int sum=in[0];
    loop(i,1,10){
      int tmp;
      cin>>tmp;
      in[i]=tmp*100;
      sum+=in[i];
      cin>>d;
    }
    cin>>a>>d>>b;
    sumb=sum;
    int i;
    //cout<<suma<<" "<<sumb<<endl;
    for(i=0;sumb>suma;i++){
      suma+=in[i];
      sumb-=(((double)in[i]/a)*b);
      //cout<<suma<<" "<<sumb<<endl;
    }
    cout<<i<<endl;
  }
}