Refuse a judge case above a stated upper bound

未关闭
#856 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@Patriciaath999 已经在做这个了。

开始于 2026年11月26日。

评估

难度
3/5
预计耗时
半天
新手友好度
65/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust
领域
backend

调研方向

Start from check_judge_case_bounds, added for #732 in #829, and the LOWER_BOUND matcher it uses. Add the mirror-image check that reads the maximum from the same constraint forms (plain integers, 10^4, 3 * 10^4), skips any other form, and refuses a judge case above it with the same message shape. Done means a case above the stated maximum is refused, and constraints with unparseable maximums are passed through unchanged.

由索引模型根据 Issue 内容生成。

描述

check_judge_case_bounds (added for #732 in #829) refuses a judge case below the lower bound a constraint states, but not one above its upper bound. The argument is the same: the interviewer gives the bound when asked, and a candidate told "n is between 1 and 8" may size a C buffer as char out[8][17], or a Java boolean[301] for a template of at most 300 letters, and then fail a case past the stated maximum.

In the review of #829, 148 of the 157 constraints LOWER_BOUND matches were counted as ending in a numeric maximum (8, 5000, 3 * 10^4), with no judge case exceeding any of them, so refusing size > highest would refuse nothing in the bank today and keep it that way.

Proposed: read the maximum of the same constraint forms (10^4, 3 * 10^4 and plain integers), refuse a case above it with the same message shape, and skip a maximum written any other way, as the lower bound does.

主要语言
Rust
星标
236
派生
153
平均合并
1 天 9 小时
30 天内合并 PR
187

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

sysprog21/codetrial 的其他 Issue

查看 sysprog21/codetrial 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。