codeforces round 354, A and E accepted, bug in C, B unfinished