tutorial for codeforces 369c