docs/tools/judger/lemon.md
author: Ir1d, HeRaNO, NachtgeistW, i-Yirannn, bear-good, ranwen, CoelacanthusHex, billchenchina, Tiger3018, Xeonacid
???+ warning "Warning" macOS 下 Lemon 可能会出现内存测试不准确的情况,因为 macOS 缺少部分 Linux 的监测工具,且 Lemon-Linux 也没有针对 macOS 进行优化.
Lemon 是 zhipeng-jia 编写的开源评测工具,源代码托管于 zhipeng-jia/project-lemon.
Ubuntu:
sudo apt update
sudo apt install qt5-default build-essential git -y
git clone --depth=1 https://github.com/Menci/Lemon.git
cd lemon
# 可以修改 -j 后面的数字来调整 make job 的线程数
./make -j2
sudo install -Dm755 -t /usr/bin/ Lemon
如要编译 LemonLime,请参阅 LemonLime 的 编译手册.
首先打开 lemon 选择「新建试题」,然后打开新建试题的文件夹.
题目和数据应该如以下格式所示:
├── data
│ ├── gendata.py
│ ├── product
│ │ ├── product100.in
│ │ ├── product100.out
│ │ ├── product10.in
│ │ ├── product10.out
│ │ ├── product11.in
...
当所有试题添加完成后,回到 lemon 选择「自动添加试题」.此时题目和数据点将显示在 lemon 当中.