#include <iostream> #include <stdio.h> #include <cstring> #include <math.h> using namespace std; double GetP(int x, int N) { )-)/N/N; } double P2E(double p, int k) { -pow(-*p, k))/; } double GetE(int N, int M, int P, int K) { doubl…
题目链接:https://vjudge.net/problem/LightOJ-1284 1284 - Lights inside 3D Grid PDF (English) Statistics Forum Time Limit: 4 second(s) Memory Limit: 32 MB You are given a 3D grid, which has dimensions X, Y and Z. Each of the X x Y x Z cells contains a l…
You are given a 3D grid, which has dimensions X, Y and Z. Each of the X x Y x Z cells contains a light. Initially all lights are off. You will have K turns. In each of the K turns, You select a cell A randomly from the grid, You select a cell B rando…
题面: You are given a 3D grid, which has dimensions X, Y and Z. Each of the X x Y x Z cells contains a light. Initially all lights are off. You will have K turns. In each of the K turns, .... 题意: 一个大立方体里面选择k次小的立方体,将小的立方体里面灯泡的开关按一下,问最后的小灯泡亮起的个数期望 思路: 单独…