Author: | ACM ICPC 2009-2010, NEERC, Northern Subregional Contest | Time limit: | 3 sec | |
Input file: | bureau.in | Memory limit: | 256 Mb | |
Output file: | bureau.out |
Long ago, in a kingdom far, far away the king decided to keep a record of all laws of his kingdom. From that moment whenever a new law was passed, a corresponding record was added to the law archive.
Many centuries later lawyers discovered that there were only two types of laws in the kingdom:
The law is considered active if and only if there is no active law that cancels it.
You are to write program that finds out which laws are still active.
The first line of the input file contains an integer number n (1 ≤ n ≤ 105) — the number of passed laws.
The following n lines describe one law each. Each description has one of the following formats:
The laws are numbered from one.
No. | Input file (bureau.in ) |
Output file (bureau.out ) |
---|---|---|
1 |
|
|