#P8437. 伟大的神

    ID: 9180 远端评测题 1000ms 256MiB 尝试: 0 已通过: 0 难度: 5 上传者: 标签>字符串洛谷原创Special JudgeO2优化构造洛谷月赛

伟大的神

Background

The great god TnyieldingUrilobite\text{T}\color{red}\text{nyieldingUrilobite} (hereinafter referred to as TU) likes strings. On the 998244353998244353-th day after getting AK in IOI, the great god TU ordered little s to find a string that he likes.

Otherwise, little s would be beaten up for 1099824435310^{998244353} years. (Even if he finds it, he will still be beaten up.)

Problem Description

The great god TU believes that a string in which the counts of all characters that appear are equal belongs to god, and he calls it a "god string".

For a string SS, if one of its substrings is a god string, then that substring is called a "god substring".

The great god TU believes that the string he likes can only be made up of l and r, and it must also satisfy the following conditions:

  • The length of the string is nn.
  • The length of the longest god substring in the string is mm.
  • The number of consecutive identical characters in the string cannot exceed kk.

Weak god little s cannot find the string that god TU likes. Now he has come to you. Can you help him?

Input Format

One line with three integers: n,m,kn, m, k.

It is guaranteed that the input mm is even.

Output Format

Output any string that god TU likes.

It is guaranteed that such a string can be found.

10 6 3
lllrrlrlll

Hint

This problem uses bundled tests.

For 100%100\% of the testdata, it is guaranteed that 1k1051 \le k \le 10^5, 4mn1054 \le m \le n \le 10^5.

It is guaranteed that such a string can be found.

Subtask 1: For 5%5\% of the testdata, it is guaranteed that k=1k = 1.

Subtask 2: For another 10%10\% of the testdata, it is guaranteed that n=mn = m.

Subtask 3: For another 30%30\% of the testdata, it is guaranteed that k3k \ge 3.

Subtask 4: No special properties.

Translated by ChatGPT 5