Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;
int p[100],t[100],v[100];
unsigned long long c[50][50];
double rest[100][50],time[100][50];
int main()
{
int n,m,l;
scanf("%d%d%d",&n,&m,&l);
c[0][0]=1;
for(int i=1;i<50;i++){
	c[i][i]=c[i][0]=1;
	for(int j=1;j<i;j++){
		c[i][j]=c[i-1][j]+c[i-1][j-1];
		}
	}
for(int i=0;i<n;i++){
	scanf("%d%d%d",p[i],t[i],v[i]);
	}
int rt=0;
for(int i=0;i<n;i++){
	double p1=p[i]/100.,t0=l*1./v[i];
for(int j=0;j<=m;j++){
	rest[i][j]=c[m][j]*(pow(p1,j))*(pow(1-p1,m-j));
	time[i][j]=t0+j*t[i];
	}
}
for(int i=0;i<n;i++){
	double ans=0;
	for(int j=0;j<=m;j++){
		double t=time[i][j],win=1;
		for(int k=0;k<n;k++){
			if(k==i)continue;
			double tmp=0;
			for(int j2=m;j2>=0;j2--){
			if(time[k][j2]<=t)break;
			tmp+=rest[k][j2];
		}
	win*=tmp;
	}
	ans+=win*rest[i][j];
	}
printf("%lf\n",ans);
}
return 0;
}

Compiler output:
a.cc:7:34: error: 'double time [100][50]' redeclared as different kind of entity
    7 | double rest[100][50],time[100][50];
      |                                  ^
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
a.cc: In function 'int main()':
a.cc:27:15: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   27 |         time[i][j]=t0+j*t[i];
      |               ^
a.cc:27:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   27 |         time[i][j]=t0+j*t[i];
      |                  ^
a.cc:27:19: error: assignment of read-only location '*(time + (((sizetype)i) + ((sizetype)j)))'
   27 |         time[i][j]=t0+j*t[i];
      |         ~~~~~~~~~~^~~~~~~~~~
a.cc:33:32: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   33 |                 double t=time[i][j],win=1;
      |                                ^
a.cc:33:35: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   33 |                 double t=time[i][j],win=1;
      |                                   ^
a.cc:33:35: error: cannot convert 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'double' in initialization
   33 |                 double t=time[i][j],win=1;
      |                                   ^
      |                                   |
      |                                   time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
a.cc:38:34: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   38 |                         if(time[k][j2]<=t)break;
      |                                  ^
a.cc:38:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   38 |                         if(time[k][j2]<=t)break;
      |                                      ^
a.cc:38:39: error: invalid operands of types 'time_t(time_t*) noexcept' {aka 'long int(long int*) noexcept'} and 'double' to binary 'operator<='
   38 |                         if(time[k][j2]<=t)break;
      |                            ~~~~~~~~~~~^~~
      |                                      |  |
      |                                      |  double
      |                                      time_t(time_t*) noexcept {aka long int(long int*) noexcept}