CCC '11 S2 - Multiple Choice

View as PDF

Submit solution


Points: 3 (partial)
Time limit: 2.0s
Memory limit: 256M

Problem type
Canadian Computing Competition: 2011 Stage 1, Senior #2

Your teacher likes to give multiple choice tests. One benefit of giving these tests is that they are easy to mark, given an answer key. The other benefit is that students believe they have a one-in-five chance of getting the correct answer, assuming the multiple choice possibilities are A, B, C, D or E.

Write a program that your teacher can use to grade one multiple choice test.

Input Specification

The input will contain the number N (0 < N < 10\,000) followed by 2N lines. The 2N lines are composed of N lines of student responses (with one of A, B, C, D or E on each line), followed by N lines of correct answers (with one of A, B, C, D or E on each line), in the same order as the student answered the questions (that is, if line i is the student response, then line N+i will contain the correct answer to that question).

Output Specification

Output the integer C (0 \le C \le N) which corresponds to the number of questions the student answered correctly.

Sample Input 1

3
A
B
C
A
C
B

Output for Sample Input 1

1

Sample Input 2

3
A
A
A
A
B
A

Output for Sample Input 2

2

Comments


  • 0
    MomoBit  commented on March 15, 2025, 5:27 p.m.

    Hey everyone, use AI to understand the question, not just to look for the answer. Ask the AI for explanations—it helps me a lot.


    • 0
      huttonzz  commented on Dec. 6, 2025, 11:09 p.m.

      It's better to not rely on ChatGPT to understand problems. This is not only a S2, but a simpler one. In actual CCC contests, no AI is permitted, and I have seen much more complex problems before.


    • 2
      HisMonDon  commented on Aug. 10, 2025, 12:22 p.m.

      Why can't you just read the question?


  • -18
    iuni__  commented on March 14, 2025, 1:28 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


    • 0
      huttonzz  commented on Dec. 6, 2025, 10:48 p.m.

      Yes, if I attempted a CCC problem in Unreal, I would also tear my hair out. This is because you cannot do DMOJ questions using a game engine. Try doing a game jam.


    • 17
      thomas_li  commented on March 14, 2025, 5:52 p.m. edited