|
|||
exam-1
There are
questions on an exam, each with answer choices
.
The correct answers are given as
.
Correct answers are worth 1 point, wrong or missing answers are worth 0
points. Students’ answers are given as
.
Some students have missing answers (denoted by ‘?’), and since the exam
is about to end and there’s no penalty for wrong answers, they will
answer these randomly. What is the expected value of the total score
()?
Correct answers: AACD Student answers: ?AAB ⟶ 1×3/4 + 2×1/4 ⟶ expected 5/4 points ABAB ⟶ 1 ⟶ expected 1 point AA?A ⟶ 2×3/4 + 3×1/4 ⟶ expected 9/4 points Thus V = 18/4 = 9/2 points is the expected total score. Input specificationThe first line contains , the number of test cases. Description of each test case: First line: (number of questions) and (number of students). Next line: string of correct answers. Then lines follow, each containing a string of length . The strings contain letters and ‘?’ (at most one ‘?’ per string). Output specificationOutput lines, each containing the corresponding for the test case, as a simplified fraction. Constraints
Sample input 1
Sample output 1
|
|||
| University of Debrecen; Faculty of Informatics; v. 09/30/2024 |