diff --git a/packages/hydrooj/src/handler/problem.ts b/packages/hydrooj/src/handler/problem.ts index bb9f8211..5bee9f11 100644 --- a/packages/hydrooj/src/handler/problem.ts +++ b/packages/hydrooj/src/handler/problem.ts @@ -193,6 +193,8 @@ export class ProblemMainHandler extends Handler { pcount = pcount - count + pdocs.length; } } + // some problems are hidden and cannot be viewed by current user + if (pcount > pdocs.length) pcount = pdocs.length; if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) { const domainIds = Array.from(new Set(pdocs.map((i) => i.domainId))); await Promise.all(