DMOPC '16 Contest 4 P2 - Systests

View as PDF

Submit solution

Points: 7 (partial)
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type

Having finished her homework, Molly decides to write the DMOPC. However, as a kitten, she can't actually code, and decides to asks you to compete on her behalf. As you (probably) know, the DMOPC is systested, usually with batches. Failing any test case in a batch results in a score of 0 for that batch.

Being the great hacker programmer that you are, you know precisely which cases belong to which batch, and how your program will do on the cases. All that remains is to see how many points you can get…

Input Specification

Line 1: An integer, B, the number of batched cases that follow.
Line 2B+1: 3 space separated integers, fi, ei, and pi, indicating that the ith batch starts on test case fi, ends on case ei, and is worth pi points.
Line B+2: An integer, F, the number of test cases the program fails.
Lines B+3B+F+2: An integer, ti, indicating the program fails the tith test case.

Output Specification

A single integer, the number of points the program can get.

Constraints

For all cases, pi (0pi104).

Subtask Points B fi,ei F ti
1 5 1B103 1fiei103 F=0 DNE
2 5 1B103 1fiei103 1F103 1ti103
3 30 1B105 1fiei105 1F103 1ti105
4 60 1B105 1fiei109 1F105 1ti109

Sample Input

Copy
3
1 5 100
20 21 10
1 18 1
2
2
5

Sample Output

Copy
10

Explanation for Sample Output

By failing test cases 2 and 5, the program fails batches 1 and 3, and only passes batch 2, giving it a total of 10 points.


Comments


  • 1
    tankturtle  commented on Feb. 15, 2017, 11:46 a.m.

    f and e and be zero. I hate you guys