相当于在线法官的离线状态。

offline-judge的Python项目详细描述


离线判断

相当于python中的在线法官。不幸的是,它使用了许多unix独有的特性。这在理论上与unix类兼容,但是,它只在linux 4.12.3上测试。

安装

$ pip install offline-judge

用法

$ judge --help
usage: judge [-h] [--no-ansi] [--full-paths] [--no-summary]
             [--no-resource-usage]
             [--only-verdicts {AC,RTE,MLE,OLE,TLE,RE,WA} [{AC,RTE,MLE,OLE,TLE,RE,WA} ...]]
             [--exclude-verdicts {AC,RTE,MLE,OLE,TLE,RE,WA} [{AC,RTE,MLE,OLE,TLE,RE,WA} ...]]
             test_cases time_limit memory_limit executable
             [{standard,floats,identical}]

An quick offline judging tool.

positional arguments:
  test_cases            Directory that contains the test cases, where the
                        input is in a file ending with `.in` and the
                        corresponding output in a file with the same name
                        ending with `.out`.
  time_limit            Time limit in seconds. Decimals are accepted. Note
                        that this limit can be bypassed by catching SIGXCPU.
  memory_limit          Memory limit in one of "B", "K", "M", "G", "T". This
                        must be one continuous string, for example "5M" is
                        valid, however, "5 M" is not. Keep in mind that this
                        has to be a multiple of the architecture's page size.
  executable            The executable to run. It is executed through the
                        execve system call. Therefore, scripts starting with
                        "#!/bin/sh" will work, though it is a questionable
                        language choice. Additional languages can be supported
                        through helper scripts.
  {standard,floats,identical}
                        Checker to be used to compare the correct output and
                        the executable output. (default: standard)

optional arguments:
  -h, --help            show this help message and exit
  --no-ansi             Disable ANSI output.
  --full-paths          Use full case paths instead of batch headings and
                        padding.
  --no-summary          Do not output the final summary.
  --no-resource-usage   Do not output time and memory usage.
  --only-verdicts {AC,RTE,MLE,OLE,TLE,RE,WA} [{AC,RTE,MLE,OLE,TLE,RE,WA} ...]
                        Only display cases with the verdicts specified.
  --exclude-verdicts {AC,RTE,MLE,OLE,TLE,RE,WA} [{AC,RTE,MLE,OLE,TLE,RE,WA} ...]
                        Do not display cases with the verdicts specified.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java需要64位jdk 1.5 for windows   eclipse运算符+对于参数类型java是未定义的。双,爪哇。双人   未下载文件扩展名为的java文件   java不支持带有POST的媒体类型   从动态创建的多个EditText读取文本时发生java错误   java无法为同一xpath单击多个按钮   如何在Java中动态格式化字符串   java Android Clear Middle活动   多线程Java内存模型volatile和x86   git在Java中通过Jgit忽略文件或文件夹   java“决策无法区分输入的备选方案1、2…”   子类的javajpa继承   java需要弄清楚如何操作mutator来弄清楚一个类,教授说,我对如何操作感到困惑   java如何使用JDBC将数据从文件复制到PostgreSQL?