原题链接:https://www.luogu.com.cn/problem/P1002
算法标签:动态规划
代码:
#include <iostream>
using namespace std;
int n,m,x,y;
bool book[29][29];
long long dp[29][29];
bool check(int tx, int ty){
if( tx>=0 && tx<=n && ty>=0 && ty<=m ){
return true;
}else{
return false;
}
}
int main(){
cin >> n >> m >> x >> y;
if( check(x, y ) ) book[x ][y ] = true;