#P2111. 考场奇遇

考场奇遇

Description

After the English exam ended and the bell rang, she took the initiative to talk to Xiao Ming and immediately asked to borrow his English paper to check answers. Xiao Ming is recognized as an English master, so he lent it to her without hesitation. After checking, Xiao Hong found her answers were vastly different; she broke into a cold sweat. At this moment, Xiao Ming came over to comfort her: “It’s okay, I’m not the official answer key; I might not be entirely correct.”

It is known that Xiao Ming’s accuracy rate is A%A\%, and there are NN questions in total. You are given Xiao Hong’s comparison result SS (a 01 string of length NN, where 1 means their answers are the same and 0 means they are different). To simplify the problem, all questions are True/False questions.

Please help Xiao Hong write a program to compute the probability that she answers at least QQ questions correctly.

(P.S. Xiao Ming later gave that paper to Xiao Hong. Don’t overthink it—it wasn’t a love token.)

Input Format

The first line contains three positive integers NN, AA, QQ.

The second line contains a 01 string SS.

Output Format

One line containing a real number: the probability that she answers at least QQ questions correctly. Print 33 decimal places.

3 90 2
100
0.172

Hint

For 90%90\% of the testdata, N50N \leq 50, N5QNN - 5 \leq Q \leq N.

For the remaining 10%10\% of the testdata, N10000N \leq 10000, Q=0Q = 0.

Translated by ChatGPT 5