need help with stream member functions


after trying to solve kingkon for about a week i looked at solution , my code got TLE and memory used was 28 M aftr adding the two lines at the top, the same code got accepted and mem used was 2.3 M,
please throw some light on the function of these stream member functions…
heres my code
and the one i looked at
thanx for ur time.