Some C/C++ Codes and Algorithms used in programming contests