Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

async-cn/PyJudge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

PyJudge

一款有点好用的 Python 评测机。

支持自定义测试点输入输出和时间限制、详细调试信息显示等基本功能,并根据程序评测结果统计得分。

Getting Started / 开始使用

Environment / 环境需求:

  • Python 3 或更高版本
  • pip (Python包安装器)

Installation / 安装

Clone this repository (克隆此仓库):

git clone https://github.com/async-cn/PyJudge.git
cd PyJudge

Install the requirements (安装所需依赖):

pip install -r requirements.txt

Usage / 使用方法

Terminal / 终端运行(推荐)

  1. 进入PyJudge目录。
cd .../PyJudge。
  1. 进入父目录
cd .. 
  1. 执行以下命令,将<path>替换为题目目录(即judge.json与提交的程序共同所在的目录)。
python -m PyJudge "<path>"

Script / 脚本运行

  1. 在图形化界面中打开PyJudge目录。
  2. 将题目目录拖动至judge.sh( Linux/MacOS/... )或judge.cmd( Windows ) 文件上。

Problem Structure / 题目结构

具体示例见example目录

题目的文件结构如下(其中.in.ans文件可选择不创建)

my_problem/
├─judge.json
├─2.in
├─2.ans
└─my_program.py

judge.json的内容

其中nodes为测试点列表,可以直接输入数据或从文件读取。

{
 "name": "我的题目",
 "program": "my_program",
 "nodes": [
 {
 "input": "7\n16\n5\n5",
 "ans": "48804"
 },
 {
 "file": {
 "input": "2.in",
 "ans": "2.ans"
 }
 }
 ]
}

Gallery / 实际使用例图

gallery/img_3.png gallery/img_1.png gallery/img_2.png

About

一款有点好用的 Python 评测机。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /