Company: Rubrik SE Intern_2nov
Difficulty: medium
Space Mission Highway Combinations Problem Description Cooper is again on a space mission to find a new home for humanity. There are m space stations in the solar system, and each station is connected to the potentially habitable planet, recently discovered by NASA by three types of interstellar highways: wormholes, jump drives, and hyperspace. For n consecutive days, Cooper will perform a round trip from a space station to the planet and back to any space station. The mission begins at the first space station. Due to the unique physics of interstellar travel, certain highway combinations are restricted for a single day round trip: A hyperspace highway cannot be used for both the outward and return journeys. A wormhole and a jump drive cannot be used together in the same round trip. You are given the number of wormholes, jump drives, and hyperspace highways available at each of the m space stations. Your task is to calculate the total number of unique combinations of highways Cooper ca