#P11445. 「ALFR Round 3」A 调皮的学生
「ALFR Round 3」A 调皮的学生
Description
The teaching quality competition is about to begin. Each student can rate one of the three major subject teachers (Chinese, math, and English) in their class. Each student should rate only one teacher. However, some students may rate multiple teachers or not rate any teacher at all. We call such students naughty students.
Given the rating situation of the teachers in the three subjects, please determine the number of naughty students in Little Shan's class.
Input Format
The first line contains an integer , indicating the total number of students in the class, with student IDs ranging from to .
The second line contains an integer , which indicates that students have rated to the Chinese teacher.
The third line contains integers, where the -th integer indicates that the student with ID has rated to the Chinese teacher.
The fourth line contains an integer , indicating that students have rated to the math teacher.
The fifth line contains integers, where the -th integer indicates that the student with ID has rated to the math teacher.
The sixth line contains an integer , indicating that students have rated to the English teacher.
The seventh line contains integers, where the -th integer indicates that the student with ID has rated to the English teacher.
Output Format
Output a single integer representing the number of naughty students in Little Shan's class.
5
3
2 3 5
2
3 1
3
1 2 3
4
Hint
In the sample, students with IDs have respectively rated of to the teachers. Thus, students with IDs are all naughty students, so the answer is .
| Subtask | Score | Constraints |
|---|---|---|
| All elements in the arrays are distinct | ||
| Arrays are provided in ascending order | ||
| - |
For all the tests, , , and . The arrays have no duplicate elements within themselves.
京公网安备 11011102002149号