mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: add a fixed rp for problem provider
This commit is contained in:
1 parent
867c38c2c6
commit
132090bbbc
2 files changed
+3
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.39.21",
|
||||
"version": "2.39.22",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -24,7 +24,7 @@ async function runProblem(...arg: any[]) {
|
||||
const udict: ND = (typeof arg[0] === 'string') ? arg[2] : arg[1];
|
||||
const nPages = Math.floor(
|
||||
(await problem.getMultiStatus(
|
||||
pdoc.domainId, { docId: pdoc.docId, rid: { $ne: null } },
|
||||
pdoc.domainId, { docId: pdoc.docId, rid: { $ne: null }, uid: { $ne: pdoc.owner } },
|
||||
).count() + 99) / 100,
|
||||
);
|
||||
const p = (pdoc.difficulty || 5) / (Math.sqrt(Math.sqrt(pdoc.nAccept)) + 1) / 10;
|
||||
@@ -40,6 +40,7 @@ async function runProblem(...arg: any[]) {
|
||||
}
|
||||
}
|
||||
}
|
||||
udict[pdoc.owner] = (udict[pdoc.owner] || 1500) + (pdoc.difficulty || 5);
|
||||
}
|
||||
|
||||
async function runContest(tdoc: Tdoc<30 | 60>, udict: ND, report: Function): Promise<void>;
|
||||
|
||||
Reference in new issue
Block a user