commit 312:A,B and 313:A,B for codeforces