Блог пользователя pastglory1

Автор pastglory1, 6 лет назад, По-английски

Hello, I'm Exile_2k4.

Now, I really want to know if there is any tools (script, Windows CMD command, or something else) that can be used to limit execution time and memory consumption. In example, a CMD script that set the time limit of a process to 5 seconds and allows 256MB of memory (which is used by the task), and after 5 seconds, or exceeded the memory limit, if the task is still running, then kill it.

Just like what Codeforces, or any Online Judge do, but more portable.

Do you have any ideas ? My OS is Windows 10 (not Linux).

Thank you.

  • Проголосовать: нравится
  • +16
  • Проголосовать: не нравится

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Use Windows Subsystem for Linux.

There are many tutorials for installation.

:)

»
6 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

There are runners for Windows, but they require complex setup. You can see the VOJ's implementation here You need some Java and C++ skills, and you need to understand Chinese.

here is a compiled CMD version.

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

There is Run from PCMS2.

»
6 лет назад, скрыть # |
 
Проголосовать: нравится -8 Проголосовать: не нравится

orz