Model a multi-level parking lot with typed slots, ticketing, and time-based fees driven by a command stream.
Build a parking lot with slots of three types: MOTORCYCLE, CAR, TRUCK. A vehicle may park in a slot of its own type or any LARGER type, where MOTORCYCLE < CAR < TRUCK. Among eligible free slots, always pick the one with the lowest slot id.
Slot ids are assigned at INIT in block order: motorcycle slots first (ids 1..m), then car slots, then truck slots.
Commands:
- INIT <m> <c> <t> : first line; counts of motorcycle, car, and truck slots.
- PARK <plate> <type> <time> : park a vehicle; print "TICKET <slotId>", or "FULL" if no eligible slot is free. `time` is an integer hour-of-entry.
- LEAVE <plate> <time> : vehicle exits; print "FEE <amount>". Fee = hoursParked * rate(occupiedSlotType), where hoursParked = max(1, exitTime - entryTime). Rates: MOTORCYCLE=10, CAR=20, TRUCK=30, based on the SLOT actually occupied, not the vehicle type. If the plate is not currently parked, print "NOTFOUND".
- AVAILABLE <type> : print "AVAILABLE <count>" of currently free slots that could accept a vehicle of <type> (same-or-larger rule).