code for icpc and similar problems