|
|
вернуться в форумHelp, please! How to solve this problem? Any hits, please (+) Hello, everybody! I tryed to solve this problem for a week. I DO NOT KNOW WHAT TO DO. I can't think out anything :( Thanks. Re: Help, please! How to solve this problem? Any hits, please (+) Dijkstra, Dijkstra... You can make a graph, where every vertex defines a state of the cube (I mean position and rotation) and every edge defines how much does it cost to move from one position to the other, then use Dijkstra, Bellman or whatever you want. I think it will help. Edited by author 02.02.2005 21:21 Thank you very much! I got AC! (-) I got Accepted. Thanks to Yaroslavtsev Grigory (SpbSPU)! (-) Re: I got Accepted. Thanks to Yaroslavtsev Grigory (SpbSPU)! (-) Послано PSV 2 янв 2007 00:28 I think BFS is useable too! Re: I got Accepted. Thanks to Yaroslavtsev Grigory (SpbSPU)! (-) I think you can write that iff you have already accepted your solution. about BFS Послано JTim 16 янв 2011 22:06 I think you can use BFS if numbers on top, bottom, left, right, front and back sides of cube are equal, else Dijkstra or bruteforce :) |
|
|