#K12646. Contest Participation
Contest Participation
Contest Participation
In this problem, you are given the total number of employees \(E\), the number who participated in Contest A \(A\), the number who participated in Contest B \(B\), and the number who participated in both contests \(C\). Your task is to compute:
- The number of employees who participated only in Contest A, calculated as \(A - C\).
- The number of employees who participated only in Contest B, calculated as \(B - C\).
- The number of employees who did not participate in any contest, calculated as \(E - (A + B - C)\).
The input is provided in a single line with four space-separated integers. The output should consist of three lines, each containing one integer in the order described above.
inputFormat
The input is read from stdin
and contains a single line with four space-separated integers: \(E\), \(A\), \(B\), and \(C\).
outputFormat
Output three integers on separate lines:
- Number of employees who participated only in Contest A.
- Number of employees who participated only in Contest B.
- Number of employees who did not participate in any contest.
The answer must be printed to stdout
.
10 4 5 2
2
3
3
</p>