Skip to content

update: 添加问题“2975.移除栅栏得到的正方形田地的最大面积”的代码和题解#1331

Merged
LetMeFly666 merged 1 commit intomasterfrom
2975
Jan 17, 2026
Merged

update: 添加问题“2975.移除栅栏得到的正方形田地的最大面积”的代码和题解#1331
LetMeFly666 merged 1 commit intomasterfrom
2975

Conversation

@LetMeFly666
Copy link
Copy Markdown
Owner

By newSolution.py using GH on Windows | close: #1328

2942: AC.cpp(#1326) - AC,100.00%,84.62% + en

docs: en(2026.1.14+)2026.1.15
Signed-off-by: LetMeFly666 <Tisfy@qq.com>
Copilot AI review requested due to automatic review settings January 17, 2026 13:23
@LetMeFly666 LetMeFly666 added the 题解 Solution label Jan 17, 2026
@LetMeFly666 LetMeFly666 self-assigned this Jan 17, 2026
Copy link
Copy Markdown
Owner Author

@LetMeFly666 LetMeFly666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a solution for LeetCode problem 2975 "Maximum Square Area by Removing Fences from a Field" along with a fix to problem 3047. The changes include adding a new code solution file, updating the README with links to the new problem, and fixing a bug in problem 3047 where it was calculating rectangle area instead of square area.

Changes:

  • Added new solution for problem 2975 with accompanying blog and documentation links
  • Fixed problem 3047 solution to correctly calculate square area (using min(dx, dy) * min(dx, dy))
  • Removed the separate _AC file for 3047 as the main file now contains the accepted solution

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

File Description
README.md Added entry for problem 2975 with links to problem, blog posts, and solution pages
Codes/3047-find-the-largest-area-of-square-inside-two-rectangles_AC.cpp Deleted as main file now contains AC solution
Codes/3047-find-the-largest-area-of-square-inside-two-rectangles.cpp Fixed bug: changed area calculation from dx * dy to min(dx, dy) * min(dx, dy) for square area
Codes/2975-maximum-square-area-by-removing-fences-from-a-field.cpp New solution that computes possible square sides by finding differences between fence positions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Codes/2975-maximum-square-area-by-removing-fences-from-a-field.cpp
@LetMeFly666 LetMeFly666 merged commit 9ddd607 into master Jan 17, 2026
7 checks passed
@LetMeFly666 LetMeFly666 deleted the 2975 branch January 17, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

题解 Solution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[newSolution]Who can add 1 more problem of LeetCode 2975

2 participants