#P2727. [USACO3.2] 01串 Stringsobits
[USACO3.2] 01串 Stringsobits
Description
They are sorted and include all -bit binary numbers whose number of s is at most ().
Your task is to output the -th smallest -bit binary number that has at most ones (it is guaranteed to exist).
Example: In , , and it contains ones.
Input Format
One line with three integers .
Output Format
Output the -th smallest binary number that satisfies the conditions.
5 3 19
10011
Hint
Problem translation from NOCOW.
USACO Training Section 3.2.
Translated by ChatGPT 5
京公网安备 11011102002149号