Skip to content

Swim In Rising Water - #162

Open
tom4649 wants to merge 2 commits into
mainfrom
778.Swim-in-Rising-Water
Open

Swim In Rising Water#162
tom4649 wants to merge 2 commits into
mainfrom
778.Swim-in-Rising-Water

Conversation

@tom4649

@tom4649 tom4649 commented Aug 22, 2026

Copy link
Copy Markdown
Owner

@tom4649
tom4649 force-pushed the 778.Swim-in-Rising-Water branch from 646ad8b to d44d337 Compare August 22, 2026 21:16


left = 0
right = n * n

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[left, right] の閉区間の中に求める値があるという設定であれば、 right = n * n - 1 から始めるのが自然だと感じました。

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

その方が自然ですね。注意不足でした。

raise ValueError("invalid grid")

n = len(grid)
heap = [(grid[0][0], 0, 0)]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

こちらのコメントをご参照ください。
rimokem/arai60#25 (comment)

candidates や frontier はいかがでしょうか?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

そうですね、具体的になるようにcandidate_cellsとしました

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants