The Rotation Game Time Limit: 15000MS Memory Limit: 150000K Total Submissions: 6396 Accepted: 2153 Description The rotation game uses a # shaped board, which can hold 24 pieces of square blocks (see Fig.1). The blocks are marked with symbols 1, 2…
原题 有1234四个数字,每个数字八个.有八种方向的移动,使得操作后中间八个方块的数字相同,求最小操作步数. 对于这种求最小步数的看起来就是dfs的题,就ID-DFS就好了. //不知道为什么都是IDDFS,我的跑的这么慢-- #include<cstdio> #include<vector> using namespace std; int a[30],in[10]={0,7,8,9,12,13,16,17,18},ans,cnt; int chg[5][8]={{0},{0,1…
Apple Tree Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 27092 Accepted: 8033 Description There is an apple tree outside of kaka's house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has been…