Some problems' answers on soj.me. C++