OK - I have this experience:
my code is rejected with MLE by judge with the follwing results (taken from several runs):
memory: 32900 - 37000,
CPU: 0,6 - 0,676
(results are different for the code when it is executed more times)
(as one can see from the list of accepted codes for the same task - then there is accepted code even with memory consumption 32720)
But when I am moni
So - questions are:
1) what is the real memory limit for code and are these limits different for different languages?
2) how MLE is computed? Does judge allows the program to run and monitor the max memory and at the end (if no errors are detected) accepts or rejects based on results of memory consumption? Or judge rejects code immediatley if request for memory is over some accpetable limit. If the later is true - then how can one explain - that - when I am monitor execution of my code in Task Manager or winXP performane monitor - and there is no memory leak in the worst case run (and the real numbers for the taks - mentioned above - is ~1.3 MB as shown in graphs and numbers) - but judge gives MLE only after some time of run as if memory leak could be present?
What 'memory limit exceed' means?
Moderator: Board moderators
Usually it's 32Mb. There are a few problems with a different limit, though.1) what is the real memory limit for code and are these limits different for different languages?
Limits are the same for all languages.
As I understand it, judge process periodically checks how much memory is used, and if it exceeds the limit, it terminates your program.2) how MLE is computed?
Which performance counters did you watch?when I am monitor execution of my code in Task Manager or winXP performane monitor - and there is no memory leak in the worst case run (and the real numbers for the taks - mentioned above - is ~1.3 MB as shown in graphs and numbers)
Task Manager, I think, by default displays "Working Set", which is just the amount of recently accessed memory.
"Private Bytes" or "Page File Bytes" more closely correspond to UVa judge's idea of memory usage.
I have just discovered strange behavior (regarding the judge's decision of task mentioned in the first post): - so - judge shows memory 38000 and gives MLE but when running on oridnary platfrom then there is out of bound exception (for static array, Pascal) and small memory usage (this should be given out as runtime error by judge!!!)... so - after fixing this (increase of upper bound of static array, no other change in code) memory consumption is less than 500...
all this would be great, but now - TLE
((((((((((((((
all this would be great, but now - TLE
