mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
judge: 优化找不到数据时的错误信息
This commit is contained in:
1 parent
dd4ecdb029
commit
8c65f89e55
6 files changed
+9
-12
No files matched your search
+1
-1
@@ -34,7 +34,7 @@
|
||||
"latest-version": "^5.1.0",
|
||||
"ora": "^5.1.0",
|
||||
"semver": "^7.3.2",
|
||||
"ts-jest": "^26.4.3",
|
||||
"ts-jest": "^26.4.4",
|
||||
"typescript": "^4.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.1.20",
|
||||
"version": "2.1.21",
|
||||
"main": "package.json",
|
||||
"author": "masnn",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
@@ -15,7 +15,7 @@
|
||||
"p-queue": "^6.6.1",
|
||||
"shell-quote": "^1.7.2",
|
||||
"supports-color": "^7.2.0",
|
||||
"systeminformation": "^4.28.1",
|
||||
"systeminformation": "^4.29.1",
|
||||
"yargs": "^16.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -208,7 +208,7 @@ async function postInit() {
|
||||
this.domainId = this.request.domainId;
|
||||
this.lang = this.request.lang;
|
||||
this.code = this.request.code;
|
||||
this.data = this.request.data.toString();
|
||||
this.data = (this.request.data || '').toString();
|
||||
this.config = this.request.config;
|
||||
this.next = getNext(this);
|
||||
this.end = getEnd(this.domainId, this.rid);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.13.46",
|
||||
"version": "2.13.47",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
@@ -31,7 +31,7 @@
|
||||
"sockjs": "^0.3.20",
|
||||
"superagent": "^6.1.0",
|
||||
"supports-color": "^7.2.0",
|
||||
"systeminformation": "^4.28.1",
|
||||
"systeminformation": "^4.29.1",
|
||||
"yargs": "^16.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -149,12 +149,9 @@ const oi: ContestRule = {
|
||||
const detail = {};
|
||||
let score = 0;
|
||||
for (const j of journal) {
|
||||
if (tdoc.pids.includes(j.pid)) {
|
||||
detail[j.pid] = j;
|
||||
if (detail[j.pid]) score -= detail[j.pid].score;
|
||||
score += j.score;
|
||||
}
|
||||
if (tdoc.pids.includes(j.pid)) detail[j.pid] = j;
|
||||
}
|
||||
for (const i in detail) score += detail[i].score;
|
||||
return { score, detail };
|
||||
},
|
||||
showScoreboard: (tdoc, now) => now > tdoc.endAt,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"hydrooj": "^2.13.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ws": "^7.3.1"
|
||||
"ws": "^7.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/ws": "^7.2.9"
|
||||
|
||||
Reference in new issue
Block a user