project-lemonlime / project_lemonlime Goto Github PK
View Code? Open in Web Editor NEW为了 OI 比赛而生的基于 Lemon + LemonPlus 的轻量评测系统 | 三大桌面系统支持
License: GNU General Public License v3.0
为了 OI 比赛而生的基于 Lemon + LemonPlus 的轻量评测系统 | 三大桌面系统支持
License: GNU General Public License v3.0
如在列表中未列出的系统(系统或版本不同)上正常使用,可在这里报告(也可直接 PR 对 README 的修改
如无法正常使用,请开新 issue 报告 bug
在 AUR 上打了个包,方便 Arch 用户安装
我希望根据通过测试点的数量给分。例如一共500个测试点,只要通过的测试点数目大于等于125个就能得100分,通过少于125个就不得分
这个应该不算难写,每评完一道题后把题目每个测试点的情况(测试点得分以及使用的时间/空间)写入一个文件,然后运行评分脚本就行
如题,尝试在 NOI Linux 下编译,貌似缺了一些组件导致无法运行。
集训期间,急用 /kel
OS:windows10 x64 1909 (18363.1139)
通过 Release v0.2.7 下载 lemon-win-x64.zip
及 lemon-win-x86.zip
均有此情况。
测试时随机 WA,从 WA 的信息来看大致情形是输出文件比答案文件短(显示第 1 行少或者某一个数字被截断)。对 std 进行测试十余次,每次 WA 的点都不同,基本排除 std 及数据问题。数据特征为输入或输出量较大,文件 IO。
尝试重启软件、重启系统,无效。
经过多次测试后复现概率降低,但仍有出现。
(曾经维护 lemonplus 时有人向我说过有莫名 WA 的问题,当时的单题重测就是为了这个开发的,但当时未复现,不清楚是否是同一个问题。)
暂不清楚其余系统是否存在这个问题。
可以利用GitHub Action 自动发布 windows安装包
以下项目提供了action
https://github.com/jurplel/install-qt-action
机房的电脑是32位的差评
这导致LemonLime没法运行
(要知道很多机房为了安全是在虚拟机里运行学生用的系统,为了性能会装32位系统)(超小声)
运行时报错:
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
[1] 29080 abort (core dumped) ./lemon
将lemon文件移至其他文件夹即可正常工作。
https://github.com/iotang/Project_LemonLime/blob/99e560b349bb0db01b0d09b43f08ff4e278883b0/qt.conf#L5
原因应为qt.conf文件第五行限定的目录不一定能与当前操作系统适配(反正manjaro这儿跑不了)
建议移除。
ps: 在manjaro上能正常工作的Plugins目录为/usr/lib/qt/plugins
(推测arch系都是如此)
Is your feature request related to a problem? Please describe.
您的功能请求是否与某些问题有关?请描述。
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
毕竟OI比赛后,代码都是需要收取的评测机上进行评测的呀,所以不管什么类型的比赛,如果使用lemon评测,肯定会遇到收取代码麻烦 困难的情景啊QAQ,甚至很多教练采用Cena收取代码,Lemon评测的方式进行比赛。
Describe the solution you'd like
描述您想要的解决方案(没有也可)
A clear and concise description of what you want to happen.
添加类似Cena的通过网络收取源代码的功能。
事实上已经有人做过这件事情了,但是希望能够移植到这个项目,请参考 https://github.com/panda2134/LemonPlusClient
Additional context
补充内容
Add any other context or screenshots about the feature request here.
如题。
之前的相关讨论 5a9b39e
如题,LemonLime 对 TLE 的判定似乎有一些偏差。
复现:
用如下代码做测试:
#include <bits/stdc++.h>
int n;
int main() {
std::cin >> n;
int ans = 1;
for (int i = 1; i <= n; ++i) {
ans = 1ll * ans * i % 998244353;
}
for (int i = 1; i <= 500000; ++i) {
std::cout << ans << std::endl;
}
}
调整 n 的大小使得该程序大概需要执行 1.5s(本机测试时取了 n=4e8)。
在 LemonLime 中开 2s 时限会得到 TLE,开 3s 时限会正常结束并且运行时间为 1.5s 左右。
若将 std::endl
换成 "\n"
,或只输出一个数时,一切正常。
无论是否使用标准输入输出都会得到以上结果。
测试环境为 Windows 10,MinGW 4.9.2 64-bit。LemonLime 为 Release 中的 lemon-win-x64.zip,版本为 0.2.6。配置为 C++11 O2。
macOS 11.0 打开后卡死,最新 release 和手动编译均是。
Originally posted by @rushcheyo in #49 (comment)
如 lemon-Windows-64.zip
,而不是现在的 5.15.0-desktop-win64_msvc2019_64.zip
,这样能比较方便打包者。不然的话万一 Qt 版本更新了也很难再匹配这个新的文件名 😂
修改此处即可
唐姐牛逼
可以使用GitHub Action自动打包发布
测通信题时,经常提示找不到源程序,不知道为啥
Is your feature request related to a problem? Please describe.
您的功能请求是否与某些问题有关?请描述。
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
希望可以将用户配置文件信息,即设置中的选项保存至用户文件夹.
Describe the solution you'd like
描述您想要的解决方案(没有也可)
A clear and concise description of what you want to happen.
本小白在升级Lemon_Lime的版本时直接替换文件夹会丢失数据和比赛历史记录.
Additional context
补充内容
Add any other context or screenshots about the feature request here.
Action 中 Ubuntu 编译完未打包和推送
Is your feature request related to a problem? Please describe.
您的功能请求是否与某些问题有关?请描述。
In low-grade classes or private "online" contests, some contestants might submit JudgeHackers and malicious code (although not likely), but the administrator will not have time to go through all codes to check if they're right.
JudgeHackers are programs that read the answer in the data directory and print it directly. It's obviously a type of cheating. Here's an example of JudgeHacker which still works with the 20200709 build.
Malicious code can be any system( )
code you care to name, for example, system("shutdown -s -t 0")
shuts down the judger in Windows. They also work in LemonLime.
Describe the solution you'd like
描述您想要的解决方案(没有也可)
A full fix of this is a sandboxed environment. This looks difficult, but there's probably already some implementations on the Internet.
To increase the difficulty of using JudgeHackers, we can simply create the judgement directory outside of the contest directory, so the program won't be able to get the path of the data by retrieving CWD. However, JudgeHackers can still work if the contestant manages to predict the absolute path of the contest.
Another way of preventing illegal code is searching for keywords in a pre-compiled source code (however this fix is language-specific and not good for compatibility). Luogu used to do this, but failed.
Additional context
补充内容
Add any other context or screenshots about the feature request here.
/Library/Developer/CommandLineTools/usr/bin/clang++ -c -pipe -stdlib=libc++ -std=c++11 -O2 -std=gnu++11 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.11 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/usr/local/Cellar/qt/5.11.2/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.11.2/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.11.2/lib/QtNetwork.framework/Headers -I/usr/local/Cellar/qt/5.11.2/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AGL.framework/Headers -I. -I/usr/local/Cellar/qt/5.11.2/mkspecs/macx-clang -F/usr/local/Cellar/qt/5.11.2/lib -o advancedcompilersettingsdialog.o advancedcompilersettingsdialog.cpp
advancedcompilersettingsdialog.cpp:240:8: error: use of undeclared identifier 'location'
if (! location.isEmpty())
^
advancedcompilersettingsdialog.cpp:242:3: error: use of undeclared identifier 'location'
location = location.replace('/', QDir::separator());
^
advancedcompilersettingsdialog.cpp:242:14: error: use of undeclared identifier 'location'
location = location.replace('/', QDir::separator());
^
advancedcompilersettingsdialog.cpp:243:33: error: use of undeclared identifier 'location'
ui->compilerLocation->setText(location);
^
advancedcompilersettingsdialog.cpp:259:8: error: use of undeclared identifier 'location'
if (! location.isEmpty())
^
advancedcompilersettingsdialog.cpp:261:3: error: use of undeclared identifier 'location'
location = location.replace('/', QDir::separator());
^
advancedcompilersettingsdialog.cpp:261:14: error: use of undeclared identifier 'location'
location = location.replace('/', QDir::separator());
^
advancedcompilersettingsdialog.cpp:262:36: error: use of undeclared identifier 'location'
ui->interpreterLocation->setText(location);
^
8 errors generated.
make: *** [advancedcompilersettingsdialog.o] Error 1
As mentioned in #68 (comment), the QSetting we are using now does not meet the demand, so we plan to replace it.
It's useful when I forget to close the program but I want to share the contest directory with someone,
Or I don't want to close the program at now.
In previous versions,the cdr file may be recorded no results.
We can write the results to CDF file immediately after each judging,
then it will be easier to share the contest directory,I think.
如题,在测评含子任务捆绑的题目时,有时候子任务的测试点比较多,我想到这样一种实现方法。
测试点 1:apb.in.1b / apb.out.1b 0 分
测试点 2:apb.in.1c / apb.out.1c 0 分
测试点 3:apb.in.1d / apb.out.1d 0 分
测试点 4:apb.in.1a / apb.out.1a 10 分, 子任务依赖 1, 2, 3 测试点
理论上,这样就可以实现 1a, 1b, 1c, 1d
全部通过的情况下才可以拿到 10 分。
可是由于实际评测时 LemonLime 忽略了分值为 0 分的测试点(显示“被忽略”),导致无论能否通过 1b, 1c, 1d
测试点,只要通过了 1a
测试点,都可以拿到 10 分。
能否修改成不忽略分值为 0 分的测试点,使得这种子任务捆绑的实现方式能够正常工作呢?或者是否有更好的子任务捆绑的实现方式呢?
P.S. 有一种可能的方式是把总分分配到每个测试点上,如
测试点 1:apb.in.1b / apb.out.1b 1 分
测试点 2:apb.in.1c / apb.out.1c 1 分
测试点 3:apb.in.1d / apb.out.1d 1 分
测试点 4:apb.in.1a / apb.out.1a 7 分, 子任务依赖 1, 2, 3 测试点
但是如果点很多,每个点能分到的分数不足 1 分,似乎就不太行了;而且似乎也不太直观。
系统环境:Deepin15.11
gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)
qt5-default/lion,now 5.7.1+dfsg-10deepin amd64
build-essential/lion,now 12.3 amd64
编译时在judgingthread.cpp
时报错
错误信息如下:
judgingthread.cpp: In member function ‘void JudgingThread::compareRealNumbers(const QString&)’:
judgingthread.cpp:696:85: error: call of overloaded ‘abs(long double)’ is ambiguous
if (std::isnan(a) != std::isnan(b) || std::isinf(a) != std::isinf(b) || (abs(a - b) > eps && abs(a - b) > eps * abs(b)))
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/bits/stl_algo.h:59,
from /usr/include/c++/6/algorithm:62,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:94,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qchar.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:48,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTime:1,
from judgingthread.cpp:29:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
from /usr/include/c++/6/algorithm:62,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:94,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qchar.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:48,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTime:1,
from judgingthread.cpp:29:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
judgingthread.cpp:696:105: error: call of overloaded ‘abs(long double)’ is ambiguous
::isnan(a) != std::isnan(b) || std::isinf(a) != std::isinf(b) || (abs(a - b) > eps && abs(a - b) > eps * abs(b)))
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/bits/stl_algo.h:59,
from /usr/include/c++/6/algorithm:62,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:94,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qchar.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:48,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTime:1,
from judgingthread.cpp:29:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
from /usr/include/c++/6/algorithm:62,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:94,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qchar.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:48,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTime:1,
from judgingthread.cpp:29:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
judgingthread.cpp:696:120: error: call of overloaded ‘abs(long double&)’ is ambiguous
(a) != std::isnan(b) || std::isinf(a) != std::isinf(b) || (abs(a - b) > eps && abs(a - b) > eps * abs(b)))
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/bits/stl_algo.h:59,
from /usr/include/c++/6/algorithm:62,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:94,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qchar.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:48,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTime:1,
from judgingthread.cpp:29:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
from /usr/include/c++/6/algorithm:62,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:94,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qchar.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:48,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTime:1,
from judgingthread.cpp:29:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
Makefile:1049: recipe for target 'judgingthread.o' failed
make: *** [judgingthread.o] Error 1
我在2020-2-22于本人新安装的Arch Linux上进行了测试,目前看来功能一切正常
系统名称 | 版本号 | 位数 | DE / WM |
---|---|---|---|
Arch | 2020-2-22 | 64 | KDE |
另外我是来请罪的,因为某些愚蠢的原因,我将AUR上git包中的文件名写错,致使build failed,在此道歉,现已修复
Is your feature request related to a problem? Please describe.
您的功能请求是否与某些问题有关?请描述。
可以增加windows命令行使用支持吗?
Describe the solution you'd like
描述您想要的解决方案(没有也可)
比如启动时开启一个后台进程,留下一个pid文件,然后可以使用命令行操作比赛设置之类的
就是能使其他程序能调用lemon吗?
报错信息:
CMake Error at CMakeLists.txt:16 (add_subdirectory):
The source directory
/home/zly/Downloads/Project_LemonLime-0.2.2/singleapplication
does not contain a CMakeLists.txt file.
-- Configuring incomplete, errors occurred!
See also "/home/zly/Downloads/Project_LemonLime-0.2.2/CMakeFiles/CMakeOutput.log".
漏提交文件了?
方便 Linux 用户使用
Describe the bug
描述一下这个 Bug
无法使用标准输入输出
To Reproduce
如何复现
Steps to reproduce the behavior:
Ubuntu 系统下,建立题目,选中定向到标准输入和输出,添加测试点,测试,提示超出时间限制,换成文件输入输出则正常。未使用任何快速读入,只使用 scanf
和 printf
读入输出。
Expected behavior
期望获得的结果
正常评测。
Version:
Additional context
也许可以补充些其他信息?
测试输入
1 2
测试输出
3
测试程序
#include <cstdio>
int main() {
int a, b;
scanf("%d%d", &a, &b);
printf("%d\n", a + b);
}
提供 将cdf导出为其他 便于读写的格式 的功能(yaml/json/xml)
lemonlime是OJ还是评测机?能在服务器上跑吗?
另:如何安装?推荐写个wiki~
Thank You :)
rt
RT, 虽然主力开发者只有 iotang 一个人……
评测结果中所有的内存消耗均显示为0.000MB
windows10
为啥要删多线程啊,有没有多线程就是3个小时和30个小时的差别啊
新建比赛的时候,填上保存文件名就在下面自动填充工作目录,每次都是主文件夹,希望可以自定义这个目录
Where is Releases?
emm 帮机房某位提的问题
他希望能使用win下的Lemonlime,用WSL里的编译器编译源码,并且在WSL中运行程序
不太清楚直接用命令wsl g++ .......
这样是否可行(我觉得他应该不会想去装GUI)
我个人觉得这个功能应该挺好的吧......是有其它的原因吗?
lemon_pt 和 LemonPlus 属近似项目,如果双方的 contributor 合作或可增加效率。
Dust1404/Project_LemonPlus#3 (comment)_
The old CDF format design lacks extensibility and is difficult to parse. It is planned to adopt a plain text format as the new competition file format.
Related project: https://github.com/alphagocc/CDF2Json
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.