solution of codeforces in c++,java and python