18/10/21 20:59:37.61 Z8EDA9Rx.net
>>210
x=c(1,1,rep(0,10))
is.P1st <- function(){ # is P the first to find the treasure?
Q=sample(x)
z=matrix(Q,ncol=4,byrow=T)
P=as.vector(z)
which.max(P) < which.max(Q)
}
re=replicate(1e4,mean(replicate(1e4,is.P1st())))
summary(re)