ウィンドウズの画面とアルゴリズムの問題

最近ウィンドウズのフォームズと言うライブラリを使用して左右の木を線で合わせるグラフを作成しました。そのためにTreeViewと呼ばれるクラスを使っています。線の原点は左の木の右側です。でもTreeViewが使う空間が広すぎるから線とイメージがかなり離れています。I need a means by which the lines I draw from the left TreeView to the right TreeView are touching the images in that treeview and are not separated by a vast amount of whitespace. I initially thought that I could make the TreeView background be transparen, but this is not permitted by the class. I am wondering whether I can leave the text describing each folder on the far left and let the images be on the far right on the space allocated to the Treeview. Even so, as is the case for the right TreeView, the images may not appear to be connected to the lines drawn.線が表示されるパネルを広がって最前にしてからこの問題を解決しました。
もう一つの問題はトップコーダーのCubeRollingアルゴリズムです。I am trying to consider the case where the cube is rolled to a goal without any holes in the row (i.e. there is a solution, even if it is a series of rolls of size 1). Turns involve a roll that is a perfect square in distance. I am wondering whether dynamic programming on the start point and number of turns makes sense. It seems that all examples given have return value of 2 or less (2,1,-1). 2歩以上かかるケースがありそうです。例えば最初は6である場合。三歩以上かかるケースがあり得るかどうか考えています。I cannot determine: a. whether 3 is a catch-all case for instances where 2 steps are insufficient. b. how cases like a starting distance of 12 can be solved. The goal can be reached in 3 steps, butI am not sure of what the search strategy should be. Also, if the holes are configured such that the optimal sequence of moves is blocked, I am unsure of how to cause the algorithm to branch.