SPOJ 32: A Needle in the Haystack