c problem for codeforces div2 solved