Refuse a judge case above a stated upper bound

Đang mở
#856 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Patriciaath999 đang làm issue này rồi.

Từ ngày 26/11/2026.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
65/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
236
Fork
153
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
187

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của sysprog21/codetrial

Tất cả issue của sysprog21/codetrial

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.