Updated code to conform to input standard. Added preprocessor flags
Corrected a bit in algorithm.tex