Fixed a bug in the solution, 1. added std namespace 2. fixed algo
added gitignore