Beaking Spackwards
Time limit1sMemory limit1024 MB
Build a lowercase string of length at most 100000 that contains exactly s palindrome substrings, where s can be up to 1e9.
Problem
The 42nd meeting of the Fortnightly Palindrome Convention is coming up. For this special occasion, the members want to spend a session admiring a special kind of palindrome-esque words. These words do not have to be palindromes by themselves, but they must contain an exact, predetermined number of palindrome substrings. Your task is to generate these palindrome-esque words.
As an example, consider the second sample input. The output abacaba contains exactly palindrome substrings: the seven individual letters, two occurrences of aba (at the start and at the end), aca, bacab, and abacaba.
Input
The input consists of one line with an integer (), the number of required palindrome substrings.
Output
Output a string that contains exactly palindrome substrings. The string must have length between and characters (inclusive) and consist only of English lowercase letters (a-z). If there are multiple valid solutions, you may output any one of them.