0_0_28069042_25529\Main.java:17: 错误: 非法字符: '#'
#include <stdio.h>
^
0_0_28069042_25529\Main.java:17: 错误: 需要class, interface或enum
#include <stdio.h>
^
0_0_28069042_25529\Main.java:18: 错误: 非法字符: '#'
#include <string.h>
^
0_0_28069042_25529\Main.java:19: 错误: 非法字符: '#'
#include <math.h>
^
0_0_28069042_25529\Main.java:20: 错误: 非法字符: '#'
#include <time.h>
^
0_0_28069042_25529\Main.java:21: 错误: 非法字符: '#'
#include <stdlib.h>
^
0_0_28069042_25529\Main.java:22: 错误: 非法字符: '#'
#define SIZE 3
^
0_0_28069042_25529\Main.java:24: 错误: 需要class, interface或enum
board target = {1,2,3,4,5,6,7,8,0};//目标
^
0_0_28069042_25529\Main.java:25: 错误: 需要class, interface或enum
board start;
^
0_0_28069042_25529\Main.java:26: 错误: 需要class, interface或enum
long add[4][2]= {-1,0,0,1,1,0,0,-1};
^
0_0_28069042_25529\Main.java:29: 错误: 需要class, interface或enum
long targetplace[SIZE *SIZE][2]; // 这个估价函数是用来剪枝的
^
0_0_28069042_25529\Main.java:30: 错误: 需要class, interface或enum
long CAL_H(board &node)
^
0_0_28069042_25529\Main.java:33: 错误: 需要class, interface或enum
long re = 0;
^
0_0_28069042_25529\Main.java:34: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++) if(node[i][j])
^
0_0_28069042_25529\Main.java:34: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++) if(node[i][j])
^
0_0_28069042_25529\Main.java:34: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++) if(node[i][j])
^
0_0_28069042_25529\Main.java:34: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++) if(node[i][j])
^
0_0_28069042_25529\Main.java:34: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++) if(node[i][j])
^
0_0_28069042_25529\Main.java:38: 错误: 需要class, interface或enum
}
^
0_0_28069042_25529\Main.java:40: 错误: 需要class, interface或enum
}
^
0_0_28069042_25529\Main.java:46: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++)
^
0_0_28069042_25529\Main.java:46: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++)
^
0_0_28069042_25529\Main.java:46: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++)
^
0_0_28069042_25529\Main.java:46: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++)
^
0_0_28069042_25529\Main.java:46: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++)
^
0_0_28069042_25529\Main.java:51: 错误: 需要class, interface或enum
k1 = (SIZE-1-i) + (SIZE-1-j);
^
0_0_28069042_25529\Main.java:52: 错误: 需要class, interface或enum
}
^
0_0_28069042_25529\Main.java:56: 错误: 需要class, interface或enum
k2 = (SIZE-1-i) + (SIZE-1-j);
^
0_0_28069042_25529\Main.java:57: 错误: 需要class, interface或enum
}
^
0_0_28069042_25529\Main.java:59: 错误: 需要class, interface或enum
for(i=0; i<SIZE*SIZE; i++) for(j=i+1; j<SIZE*SIZE; j++)
^
0_0_28069042_25529\Main.java:59: 错误: 需要class, interface或enum
for(i=0; i<SIZE*SIZE; i++) for(j=i+1; j<SIZE*SIZE; j++)
^
0_0_28069042_25529\Main.java:59: 错误: 需要class, interface或enum
for(i=0; i<SIZE*SIZE; i++) for(j=i+1; j<SIZE*SIZE; j++)
^
0_0_28069042_25529\Main.java:59: 错误: 需要class, interface或enum
for(i=0; i<SIZE*SIZE; i++) for(j=i+1; j<SIZE*SIZE; j++)
^
0_0_28069042_25529\Main.java:62: 错误: 需要class, interface或enum
if(target[i/SIZE][i%SIZE] > target[j/SIZE][j%SIZE]) k2++;
^
0_0_28069042_25529\Main.java:63: 错误: 需要class, interface或enum
}
^
0_0_28069042_25529\Main.java:64: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++)
^
0_0_28069042_25529\Main.java:64: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++)
^
0_0_28069042_25529\Main.java:64: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++)
^
0_0_28069042_25529\Main.java:64: 错误: 需要class, interface或enum
for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++)
^
0_0_28069042_25529\Main.java:67: 错误: 需要class, interface或enum
if(target[i][j]==SIZE*SIZE) target[i][j]=0;
^
0_0_28069042_25529\Main.java:68: 错误: 需要class, interface或enum
}
^
0_0_28069042_25529\Main.java:70: 错误: 需要class, interface或enum
}
^
0_0_28069042_25529\Main.java:75: 错误: 需要class, interface或enum
for(i=0; i<dep; i++)
^
0_0_28069042_25529\Main.java:75: 错误: 需要class, interface或enum
for(i=0; i<dep; i++)
^
0_0_28069042_25529\Main.java:75: 错误: 需要class, interface或enum
for(i=0; i<dep; i++)
^
0_0_28069042_25529\Main.java:81: 错误: 需要class, interface或enum
break;
^
0_0_28069042_25529\Main.java:82: 错误: 需要class, interface或enum
case 1:
^
0_0_28069042_25529\Main.java:84: 错误: 需要class, interface或enum
break;
^
0_0_28069042_25529\Main.java:85: 错误: 需要class, interface或enum
case 2:
^
0_0_28069042_25529\Main.java:87: 错误: 需要class, interface或enum
break;
^
0_0_28069042_25529\Main.java:88: 错误: 需要class, interface或enum
case 3:
^
0_0_28069042_25529\Main.java:90: 错误: 需要class, interface或enum
break;
^
0_0_28069042_25529\Main.java:91: 错误: 需要class, interface或enum
}
^
0_0_28069042_25529\Main.java:94: 错误: 需要class, interface或enum
}
^
0_0_28069042_25529\Main.java:99: 错误: 需要class, interface或enum
char path[100000];
^
0_0_28069042_25529\Main.java:100: 错误: 需要class, interface或enum
long max_depth, max_nodes, tot_nodes, cur_nodes;
^
0_0_28069042_25529\Main.java:102: 错误: 需要class, interface或enum
bool ida(board &node, long x0, long y0, long dep, long d, long h) //i表示从哪个方向上过来的,最初的初值为-1。
^
0_0_28069042_25529\Main.java:105: 错误: 需要class, interface或enum
cur_nodes ++;
^
0_0_28069042_25529\Main.java:106: 错误: 需要class, interface或enum
long i,j,k,x1,y1,h1;
^
0_0_28069042_25529\Main.java:107: 错误: 需要class, interface或enum
if(memcmp(node, target, sizeof(target))==0)
^
0_0_28069042_25529\Main.java:110: 错误: 需要class, interface或enum
return 1;
^
0_0_28069042_25529\Main.java:111: 错误: 需要class, interface或enum
}
^
0_0_28069042_25529\Main.java:113: 错误: 需要class, interface或enum
board node1;
^
0_0_28069042_25529\Main.java:114: 错误: 需要class, interface或enum
for(i=0; i<4; i++)
^
0_0_28069042_25529\Main.java:114: 错误: 需要class, interface或enum
for(i=0; i<4; i++)
^
0_0_28069042_25529\Main.java:114: 错误: 需要class, interface或enum
for(i=0; i<4; i++)
^
0_0_28069042_25529\Main.java:117: 错误: 需要class, interface或enum
x1 = x0 + add[i][0];
^
0_0_28069042_25529\Main.java:118: 错误: 需要class, interface或enum
y1 = y0 + add[i][1];
^
0_0_28069042_25529\Main.java:119: 错误: 需要class, interface或enum
if(x1<0||y1<0||x1==SIZE||y1==SIZE) continue;
^
0_0_28069042_25529\Main.java:120: 错误: 需要class, interface或enum
memcpy(node1, node, sizeof(node1));
^
0_0_28069042_25529\Main.java:121: 错误: 需要class, interface或enum
node1[x1][y1] = 0;
^
0_0_28069042_25529\Main.java:122: 错误: 需要class, interface或enum
node1[x0][y0] = node[x1][y1];
^
0_0_28069042_25529\Main.java:123: 错误: 需要class, interface或enum
if(i==3 && y1<targetplace[node[x1][y1]][1]) h1=h-1; // 跟目标位置比比,看是不是有效移动(就是这样移动OK不OK)
^
0_0_28069042_25529\Main.java:124: 错误: 需要class, interface或enum
else if(i==1 && y1>targetplace[node[x1][y1]][1]) h1=h-1;
^
0_0_28069042_25529\Main.java:125: 错误: 需要class, interface或enum
else if(i==0 && x1<targetplace[node[x1][y1]][0]) h1=h-1;
^
0_0_28069042_25529\Main.java:126: 错误: 需要class, interface或enum
else if(i==2 && x1>targetplace[node[x1][y1]][0]) h1=h-1;
^
0_0_28069042_25529\Main.java:127: 错误: 需要class, interface或enum
else h1=h+1; //这个方向上的移动不OK,那么估价函数h(x)就又远了一步
^
0_0_28069042_25529\Main.java:128: 错误: 需要class, interface或enum
if(h1+dep+1>ans) continue; // 根据估价值(h1+dep),具体来说是(dep+1)+h1
^
0_0_28069042_25529\Main.java:130: 错误: 需要class, interface或enum
path[dep] = i;
^
0_0_28069042_25529\Main.java:131: 错误: 需要class, interface或enum
if(ida(node1,x1,y1,dep+1,i,h1)) return 1;
^
0_0_28069042_25529\Main.java:132: 错误: 需要class,
|