Company: Dealshare_7oct
Difficulty: medium
Christmas party Problem Description There are N cities, and M of them will be organizing a Christmas party for the holiday. Each city is numbered from 1 to N. The remaining cities that are not organizing the Christmas party are required to travel to one of the cities where the party is being organized or to another non-party city. Each of the remaining cities has a reindeer vehicle. The reindeer vehicles are numbered from 1 to N-M and are assigned to the remaining cities in order (the first remaining city gets vehicle 1, the second gets vehicle 2, etc.) The cost of traveling from city X to city Y with reindeer vehicle Z is calculated using the formula (X + OFF) * (X + Y + OFF) * (X + Y + Z + OFF) % MOD + 1 dollars, where % denotes modulo and OFF denotes an offset parameter. You need to: Choose M cities to host the Christmas party. Assign each remaining city to either travel to a party city OR to another remaining city. Ensure that each remaining city is assigned exactly one destination