Codejam 1B and Some problems from Codeforces