Php Array And String Problems Codeforces