output format

is it necessary to accept input all at once and then give output statements together? beacause many a times my code gets accepted after making just that change while other submitted codes seem to be working with alternate input and output.

No, it is not necessary because all the output is going into an output text file.

So,output separately or output after taking the input, it will eventually go into the output text file.

It won’t create any difference.
The only aim is to output in the order in which the problem statement demands.
Here, on this link I have explained everything in detail

http://discuss.codechef.com/questions/44460/how-to-display-output?page=1#44467

thanx a lot!..

//