Replies: 2 comments
solutions
subtasks
|
0 replies
|
แก้ subtask หน่อยครับ อันเก่าผิด แก้เป็น
โดยที่ v = n+m+w |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
statement
ให้ grid n*m แต่ละช่องเป็น wall, empty, goal ขอบ grid ทุกขอบถือเป็น wall ถือว่ามี wall จำนวน w ที่
ถ้าด้านหลังเป็น wall, สามารถถีบตัวเองเพื่อเคลื่อนไปไหนก็ได้ใน row / column นั้น
มี goal แค่ g ที่
given (x, y) หาว่าจาก goal g ที่ ไปได้กี่ที่ + จากทุก goal ที่ไปได้ต้องกระโดดเฉลี่ยกี่ครั้ง
concept
bfs, binary search -> O((w+n+m)log(nm)) (มั้ง)
All reactions