Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<iostream>
using namespace std;
#define eps 0.0000001


bool zero(double a,double b){
    if((a-b)<eps && (a-b)>-eps)return true;
    return false;
}

double c[110][110];
int n,m;
double l;
struct player{
    double p;
    double t;
    double v;
}pl[210];
double rp[210][110];
double sp[210][110];


void init(){
    int i,j;
    for(i=0;i<110;i++){
        c[i][0]=1;
        for(j=1;j<i;j++){
            c[i][j]=c[i-1][j]+c[i-1][j-1];
        }
        c[i][i]=1;
    }
    /*
    for(i=0;i<10;i++){
        for(j=0;j<10;j++){
            printf("%.0f ",c[i][j]);
        }
        printf("\n");
    }
*/
}
double ppow(double p,int k){
    if(k==0)return 1.0;
    else if(k==1)return p;
    double ret = ppow(p*p,k/2);
    if(k%2==0)return ret;
    else return ret*p;
}

double res[210];
double tmp;
double solve(double p,int m,int n)
{
    double ret=1;
    for(int i=0;i<n;i++)
    {
        ret=ret*(m-i);
        ret=ret/(i+1);
        ret=ret*p;
    }
    for(int i=n;i<m;i++)
    {
        ret=ret*(1.0-p);
    }
    
    return ret;
}
int main(){
    
    //freopen("D.in", "r", stdin);
    //freopen("D.out3", "w", stdout);
    
    int i,j,k;
    double t;
    int ti;

    init();
    while(scanf("%d%d%lf",&n,&m,&l) != EOF){
        for(i=0;i<n;i++){
            scanf("%lf%lf%lf",&pl[i].p,&pl[i].t,&pl[i].v);
            //cout<<pl[i].p<<endl;
            pl[i].p=pl[i].p/100.0;
            for(j=0;j<=m;j++){
                rp[i][j]=solve(pl[i].p,(int)m,(int)j);
                //c[m][j]*ppow((1.0-pl[i].p),m-j)*ppow(pl[i].p,j);
                if(j==0)sp[i][j]=rp[i][j];
                else sp[i][j]=sp[i][j-1]+rp[i][j];
            }
        }/*
        for(i=0;i<n;i++){
            for(j=0;j<=m;j++){
                printf("<%f,%f> ",rp[i][j],sp[i][j]);
            }
            printf("\n");
        }*/
        

        for(i=0;i<n;i++){
            res[i]=0.0;
            for(j=0;j<=m;j++){
                tmp=1.0;
                for(k=0;k<n;k++){
                    if(i!=k){
                        if(l/pl[i].v+pl[i].t*(double)j<l/pl[k].v){
                            continue;
                        }
                        else if(l/pl[i].v+pl[i].t*(double)j>l/pl[k].v+m*pl[k].t || zero(l/pl[i].v+pl[i].t*(double)j,l/pl[k].v+m*pl[k].t)){
                            tmp=0.0;
                            break;
                        }
                        else{
                            t=l/pl[i].v+pl[i].t*(double)j-l/pl[k].v;
                            ti=(int)(t/pl[k].t);
                            //if(zero(pl[k].t*ti,t))ti--;
                            tmp*=(1.0-sp[k][ti]);
                        }
                    }
                }
                res[i]+=tmp*rp[i][j];
            }
            if(res[i]<eps)res[i]=0.0;
        }
        for(i=0;i<n;i++){
            printf("%.8f\n",res[i]);
        }
        //printf("\n");
        break
    }

    //while(1);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:129:14: error: expected ';' before '}' token
  129 |         break
      |              ^
      |              ;
  130 |     }
      |     ~