Binary string with given frequencies of sums of consecutive pairs of characters
Given three integers P, Q, and R, the task is to generate a binary string with P, Q, and R pairs of consecutive characters with sum 0, 1, and 2 respectively. Examples: Input: P = 1, Q = 2, R = 2 Output: 111001 Explanation: Substrings "00", "10", "01", and "11" have sums 0, 1, 1, and 2 respectively.