#P3613. 【深基15.例2】寄包柜
【深基15.例2】寄包柜
Problem Description
There are parcel lockers in a supermarket. Each locker has a different number of compartments. The -th locker has compartments, but we do not know the values of . For each locker, the compartments are numbered from 1 to . Now there are operations:
1 i j k: Put item into compartment of locker . When , it means clearing that compartment.2 i j: Query what item is in compartment of locker . It is guaranteed that the queried locker has had items stored in it.
It is known that the total number of compartments in the supermarket will not exceed . The values are fixed but unknown, and it is guaranteed that is at least the maximum compartment index ever used in a store-item request for that locker. Of course, it is also possible that some lockers do not have even a single compartment.
Input Format
The first line contains 2 integers and , the number of parcel lockers and the number of queries.
The next lines each contain several integers, representing one operation.
Output Format
For each query operation, output the answer, one per line.
5 4
1 3 10000 118014
1 1 1 1
2 3 10000
2 1 1
118014
1
Hint
: A new set of hack testdata has been added.
Translated by ChatGPT 5