Closed vexorian closed 10 years ago
Arena maintainer reports: http://apps.topcoder.com/forums/?module=Thread&threadID=806641&start=15&mc=26#1828583
The latest arena version has ProblemCompoment.getExecutionTimeLimit() and ProblemCompoment.getMemLimit(),
Comment from maintainer wasn't so helpful. It turns out that the method names he shared were wrong or inexistent. I have, however, managed to make Greed fetch the memory limit: https://github.com/vexorian/topcoder-greed/commit/3992da3af2c6375ebb9931d65224e39fb0e87208
So you would use ${Problem.MemoryLimitMB}
to fetch the memory limit in MB (that's how the plugin interface sends it, so I think it is a fair bet to think that the limit will always be in MB).
I am quite sure that the arena will provide time limit in milliseconds. I added some placeholders for it.
I also have some placeholders for the Time limit. ${Problem.TimeLimitMillis}
gets it as integer and is useful for code templates, ${Problem.TimeLimitSeconds}
returns it as double and I think it is best for the HTML template. Actually, we might need a good double/float formatter/renderer for this, or does it already exist?
done by #116
Since latest arena update, problem statements now have a limits section. It is important we figure out a way for Greed to detect this section, so that problem statement template can use it.
Could also be useful for custom test templates to know the limits so that they could enforce them.