I am trying to solve the APIO problems. The problems and the contest data can be found here:
I can't seem to find the editorials anywhere, so I hope that you can help me out. Thanks!
I am not sure how to solve this problem. I was able to find the solution in this thread:
However, it did not state how to solve invalid cases. Can someone help me?
I was only able to solve the 60% case with a BFS. I think that to get 100%, you need to do some line sweep, but I am not sure how you can do so. Can someone help me?
I really do not have much ideas for this problem. I could only solve the case for strings up to 3 letters long by bruteforce.
Thanks in advance! =D