Company: rubrik_4oct
Difficulty: medium
Storage Pair Matching Problem Description A data center rack holds 2N storage drives standing in a single row, numbered 1, 2, ..., 2N from left to right. For redundancy, some pairs of drives are compatible for RAID mirroring because of their firmware versions. You are given the M compatible pairs; every other pair of drives is incompatible. In one operation you choose two drives that are currently adjacent in the rack and compatible with each other, pair them, and remove both from the rack. The remaining drives then slide together to close the gap (if a gap was created), so the drives that were to the left and to the right of the removed pair become adjacent. Your task is to count the number of different ways to perform this operation exactly N times, so that every drive gets paired. Two ways are considered different when there is some i ( 1 <= i <= N ) such that the pair of drives chosen in the i -th operation differs between the two ways. In other words, the order of the operat