← Back to topics
Topic

Mornar

u
uros94
I wonder why is my solution bad.
All tests end up with "Output limit exceeded". Output limit is 4MB, isn't it?
I'm sure my program doesn't normally dump more than even 1MB.
I've tested my solution with tests from www.yuoi.nis.edu.yu
It all works.
But here, grader doesn't grade it as good.

Any help?
i
iggy91
Newline on Linux isn't same like on Windows... Let's see what can we do about it...
u
uros94
I know, on Windows it should be \r\n and on Linux simply \n, but I didn't use \n in my source. I used endl instead, and it works fine in all tasks.
I doubt this is the problem.
i
iggy91
You have

memset(K.start, '\0', 30);

in your input function. When I change '\0' character to something else, I get a lot of output. So, grader must be thinking of char '\0' in some other way than end of string... At least I think so... =S
u
uros94
Oh, I've just noticed that too. Does null-terminator on Linux differ from one on Windows?