请教代码问题。
这道题我的代码直接爆零,不理解为什么。看完题解后觉得除了dp的部分,其他的知识点都用到了,而且思路完整。下面献上本人拙劣的代码,请老师指教。
#include
using namespace std;
int flag[25][25];//horse control
int n,m;//B location
int hi,hj;//horse location
int ans=0,now;
void dfs(int x,int y){
if(now>n>>m>>hi>>hj;
for(int i=1;i
using namespace std;
int ans=0;
int n1,m1,n,m;
void dfs(int x,int y){
if(x>n||y>m||x>n>>m>>n1>>m1;
dfs(0,0);
cout<