mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: Math.floor(time&mem)
This commit is contained in:
1 parent
c67e2b85e3
commit
437df2391a
2 files changed
+6
-6
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.10.8",
|
"version": "2.10.9",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -40,12 +40,12 @@ function proc({
|
|||||||
env: getConfig('env').split('\n'),
|
env: getConfig('env').split('\n'),
|
||||||
files: [
|
files: [
|
||||||
stdin ? { src: stdin } : { content: '' },
|
stdin ? { src: stdin } : { content: '' },
|
||||||
{ name: 'stdout', max: 1024 * 1024 * size },
|
{ name: 'stdout', max: Math.floor(1024 * 1024 * size) },
|
||||||
{ name: 'stderr', max: 1024 * 1024 * size },
|
{ name: 'stderr', max: Math.floor(1024 * 1024 * size) },
|
||||||
],
|
],
|
||||||
cpuLimit: time * 1000 * 1000 * rate,
|
cpuLimit: Math.floor(time * 1000 * 1000 * rate),
|
||||||
realCpuLimit: time * 3000 * 1000 * rate,
|
realCpuLimit: Math.floor(time * 3000 * 1000 * rate),
|
||||||
memoryLimit: memory * 1024 * 1024,
|
memoryLimit: Math.floor(memory * 1024 * 1024),
|
||||||
strictMemoryLimit: getConfig('strict_memory'),
|
strictMemoryLimit: getConfig('strict_memory'),
|
||||||
// stackLimit: memory * 1024 * 1024,
|
// stackLimit: memory * 1024 * 1024,
|
||||||
procLimit: process_limit,
|
procLimit: process_limit,
|
||||||
|
|||||||
Reference in new issue
Block a user