Discussion:
A2 sample inputs
(too old to reply)
kun qian
2011-10-10 20:13:16 UTC
Permalink
The sample output/input seem to have no newline at the end of file. I
wonder if this will affect the expect output of our program.
cs240
2011-10-11 02:04:50 UTC
Permalink
It shouldn't affect anything. With that said, your program shouldn't
output any empty lines after output the heap.

Vivian
CS240 Tutor
Post by kun qian
The sample output/input seem to have no newline at the end of file. I
wonder if this will affect the expect output of our program.
kun qian
2011-10-11 02:55:44 UTC
Permalink
Post by cs240
It shouldn't affect anything. With that said, your program shouldn't
output any empty lines after output the heap.
Vivian
CS240 Tutor
Post by kun qian
The sample output/input seem to have no newline at the end of file. I
wonder if this will affect the expect output of our program.
Everyone should end with a newline. But the given output doesn't. It
might just be the html's fault, could you check if the solution output
ends with a newline? For example, if the output doesn't end with
newline it would look like this:

a
b
c linux006@:~/

But if it does end with newline it would look like this

a
b
c
linux006@:~/

Which one is it?
cs240
2011-10-11 13:24:52 UTC
Permalink
The second one. Actually, if you re-save the input as a text file after
downloading it and open it in a text editor, you will see that there is a newline at the end of the
file. What I meant in the last post is that your program should not output
any EXTRA empty lines after the heap.

Vivian
CS240 Tutor
Post by kun qian
Post by cs240
It shouldn't affect anything. With that said, your program shouldn't
output any empty lines after output the heap.
Vivian
CS240 Tutor
Post by kun qian
The sample output/input seem to have no newline at the end of file. I
wonder if this will affect the expect output of our program.
Everyone should end with a newline. But the given output doesn't. It
might just be the html's fault, could you check if the solution output
ends with a newline? For example, if the output doesn't end with
a
b
But if it does end with newline it would look like this
a
b
c
Which one is it?
Loading...