DWITE '08 R5 #2 - Kill Dash Nine

View as PDF

Submit solution

Points: 5
Time limit: 2.0s
Memory limit: 64M

Problem type
DWITE Online Computer Programming Contest, February 2009, Problem 2
So I mean what do you do when, like when there's a process running, and you know\
it just doesn't know when to quit?

I donno; I guess you've got to kill it.

Yeah.. yeah.. But what if it's like locked up, and it's not responding to messages..

Kill dash one?

No.. No, man. What if you just want to raise the interrupt priority all the way to the top?
Then you've got to run..

Kill dash nine!
"Monzy performs at Stanford Univ."

The input will contain 5 sets of inputs, 6 lines each. The first line will be a command in a form of kill -signal_number. 1 \le signal\_number \le 9. Each of the following lines will contain a process name, a single word, and an integer 1 \le i \le 9 — how badly it's broken.

The output will contain 5 sets of output, up to 25 lines max, a list of processes remaining after the command.

Note: That is, any process with a number smaller than or equal to the one used in a command will be taken out of the list. Output what remains.

Another note: Keep the list of processes in the same order as they were in the input file.

Sample Input (first two shown)

kill -1
one 1
two 2
three 3
four 4
five 5
kill -4
tony 1
dan 2
monzy 3
compsci 4
dwite 5

Sample Output (first two shown)

two
three
four
five
dwite

Problem Resource: DWITE

Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported

Comments

There are no comments at the moment.