[C++/Python] Simple solution, beats 100 %
Talk is cheap, here is the code: \n\ncpp\nclass ParkingSystem {\npublic:\n    int slots[3];\n    ParkingSystem(int big, int medium, int small) {\n        slots[
Talk is cheap, here is the code: \n\n```cpp\nclass ParkingSystem {\npublic:\n    int slots[3];\n    ParkingSystem(int big, int medium, int small) {\n        slots[0]=big, slots[1]=medium, slots[2]=small;\n    }\n    \n    bool addCar(int carType) {\n        if(slots[carType-1] > 0) {\n          slots[carType-1] --; \n          return true;\n        }\n        return false; \n    }\n};\n```\n\nPython code:\n\n```python\nclass ParkingSystem:\n\n    def __init__(self, big: int, medium: int, small: int):\n        self.slots=[big, medium, small]\n\n\n    def addCar(self, carType: int) -> bool:\n        self.slots[carType-1] -= 1\n        return self.slots[carType-1] >= 0\n```
[]