Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
48396 奚晨瑞 过河卒 C++ 解答错误 0 MS 252 KB 422 2024-06-07 15:57:35

Tests(2/5):


#include<bits/stdc++.h> using namespace std; long long a[20][20]; int main() { int m,n; int x,y; cin>>m>>n>>x>>y; for(int i=0;i<=m;i++){ for(int j=0;j<=n;j++){ if((i-x)*(j-y)==2||(i-x)*(j-y)==-2){ a[i][j]=0; } else if(i==x&&j==y){ a[i][j]=0; } else if(i==0||j==0){ a[i][j]=1; } else{ a[i][j]=a[i-1][j]+a[i][j-1]; } } } cout<<a[m][n]; return 0; }


测评信息: