1663.
To my boyfriend
时间限制 1000 ms
内存限制 32 MB
Dear Liao
I never forget the moment I met with you. You carefully asked me: "I have a very difficult problem. Can you teach me?". I replied with a smile, "of course". You replied:"Given a matrix, I randomly choose a sub-matrix, what is the expectation of the number of **different numbers** it contains?"
Sincerely yours,
Guo
输入数据
输出数据
Each case outputs a number that holds 9 decimal places.
样例输入
复制
1
2 3
1 2 1
2 1 2
\n
· \n
· · \n
· · \n
样例说明
6(size = 1) + 14(size = 2) + 4(size = 3) + 4(size = 4) + 2(size = 6) = 30 / 18 = 6(size = 1) + 7(size = 2) + 2(size = 3) + 2(size = 4) + 1(size = 6)