Company: Amazon_24feb
Difficulty: medium
In Amazon's warehouse robotics system, multiple robots operate simultaneously to transport packages efficiently. Each robot can be in one of two states: Standby or Operating. For smooth coordination, each robot i has a predefined coordination threshold, coordinationThreshold[i] . This threshold determines the conditions under which a robot malfunctions: A robot i malfunctions if it is in the Operating state but the total number of other robots in the Operating state is less than coordinationThreshold[i] . A robot i malfunctions if it is in the Standby state but the total number of other robots in the Operating state is greater than or equal to coordinationThreshold[i] . If any robot malfunctions, the system is considered unstable. Return the total number of distinct valid configurations where no robot malfunctions. Note: A configuration is an assignment of each of the n robots to either Operating or Standby. A configuration is considered valid if no robot malfunctions under that arrang