Solutions for Problems of Algorithm Contests and Online Judges