Editorial
Subtask 1
When , the only substring of length is the entire string. Compare with . Both the time complexity and the additional space complexity are per test case.
Subtask 2
Check each pair of adjacent characters. If any pair has followed by , print AI slop. Otherwise, print Human made.
Every substring of length consists of a pair of adjacent characters. Thus, this procedure determines exactly whether occurs as a substring. If , there is no adjacent pair, so the answer is Human made.
The time complexity is per test case, and storing the string uses space. The check itself uses additional space after the string is stored. The total time complexity is .
A built-in substring search can also be used to check whether occurs.
Solution written by GPT6