[Solution] Zero Ones Equal One Zeros CodeChef Solution
Kulyash believes in equality.
Given an integer , output a binary string of length such that:
- The count of subsequences in the string is equal to the count of subsequences;
- The string has at least one occurrence of as well as .
If multiple such strings exist, print any. Also, it is guaranteed that corresponding to the given input, an answer always exists.
Input Format
- First line will contain , number of test cases. Then the test cases follow.
Solution Click Below:- CLICK HERE
- Each test case contains of a single line of input, an integer - the length of the binary string.
Output Format
For each test case, output any binary string of length satisfying the given conditions.
No comments:
Post a Comment