You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
414 B
C++

#include <cstdio>
int n = 1, l;
char s[100001];
int main()
{
s[0] = 'a';
for (int i = 0; i < 12; i++)
{
for (int j = 0; j < n; j++)
s[j + n] = s[j] == 'a' ? 'b' : 'a';
n <<= 1;
}
l = n >> 1;
s[n++] = 'a';
for (int i = 1; i < l; i++) s[n++] = 'a';
s[n++] = 'b';
for (int i = 1; i < l; i++) s[n++] = 'a';
printf("8192 2048\n%s", s);
return 0;
}