VC++6.0错误:Cannot open include file: 'cstdio.h': No such file or directory
部分程序://mn.cpp:Definestheentrypointfortheconsoleapplication.//#include<iostream.h>#inc...
部分程序:// mn.cpp : Defines the entry point for the console application.
//
#include <iostream.h>
#include <cstdio.h>
#include <stack>
using namespace std;
typedef const __int64 ll;
typedef struct point{
int x, y;
}point;
stack<point> sp;
const int MAXN = 20;
int g[MAXN][MAXN];
point vp[MAXN+MAXN];
ll path(ll m, ll n){
if(m == 1 || n == 1) return 1;
else return path(m-1, n) + path(m, n-1);
}
ll fact(ll n){
if(n == 0) return 1;
else return n*fact(n-1);
}
ll path1(ll m, ll n){
return fact(m-1+n-1)/(fact(m-1)*fact(n-1));
}
bool get_path(int m, int n){
point p; p.x=n; p.y=m;
sp.push(p);
if(n==1 && m==1) return true;
bool suc = false;
if(m>1 && g[m-1][n])
suc = get_path(m-1, n);
if(!suc && n>1 && g[m][n-1])
suc = get_path(m, n-1);
if(!suc) sp.pop();
return suc;
} 展开
//
#include <iostream.h>
#include <cstdio.h>
#include <stack>
using namespace std;
typedef const __int64 ll;
typedef struct point{
int x, y;
}point;
stack<point> sp;
const int MAXN = 20;
int g[MAXN][MAXN];
point vp[MAXN+MAXN];
ll path(ll m, ll n){
if(m == 1 || n == 1) return 1;
else return path(m-1, n) + path(m, n-1);
}
ll fact(ll n){
if(n == 0) return 1;
else return n*fact(n-1);
}
ll path1(ll m, ll n){
return fact(m-1+n-1)/(fact(m-1)*fact(n-1));
}
bool get_path(int m, int n){
point p; p.x=n; p.y=m;
sp.push(p);
if(n==1 && m==1) return true;
bool suc = false;
if(m>1 && g[m-1][n])
suc = get_path(m-1, n);
if(!suc && n>1 && g[m][n-1])
suc = get_path(m, n-1);
if(!suc) sp.pop();
return suc;
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询