codeforces, D for doable