エイシングプログラミングコンテスト2021(AtCoder Beginner Contest 202)
翻译中…
Problem Statement
翻译中…
Among the strings of length $A + B$ containing $A$ occurrences of a and $B$ occurrences of b, find the string that comes $K$-th in the lexicographical order.
翻译中…
Constraints
翻译中…
$1 \leq A, B \leq 30$$1 \leq K \leq S$, where$S$is the number of strings of length$A + B$containing$A$occurrences ofaand$B$occurrences ofb.- All values in input are integers.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
A B K
翻译中…
Output
翻译中…
Print the answer.
翻译中…
样例
Input #1
2 2 4
Output #1
baab
Here are the strings containing two `a`s and two `b`s in the lexicographical order: `aabb`, `abab`, `abba`, `baab`, `baba`, and `bbaa`. The fourth string, `baab`, should be printed.
Input #2
30 30 118264581564861424
Output #2
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
$K$ may not fit into a $32$-bit integer type.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。