#include<cstdio>
using namespace std;
const int N=3030,P=1000000007;
int i,j,k,n,m,L,R,t,ans;
int f[2][2][N];
void Up(int &x,int y) {
x=(x+y)%P;
}
int main() {
scanf("%d%d",&n,&m);
L=1;R=0;
for (i=1;i<=n;i++) f[R][0][i]=1;
f[R][1][0]=1;
for (i=1;i<=m;i++) {
L^=1;R^=1;
for (j=0;j<=n;j++) {
if (f[L][0][j]) {
t=f[L][0][j];
if (j<n) Up(f[R][0][j+1],t),Up(f[R][0][j],t);
if (j>1) Up(f[R][0][j-1],t),Up(f[R][0][j],t);
if (j==1) Up(f[R][1][0],t),Up(f[R][1][1],t);
f[L][0][j]=0;
}
if (f[L][1][j]) {
t=f[L][1][j];
if (j<n) Up(f[R][1][j+1],t),Up(f[R][1][j],t);
if (j>0) Up(f[R][1][j-1],t),Up(f[R][1][j],t);
f[L][1][j]=0;
}
}
}
for (i=0;i<=n;i++) Up(ans,f[R][1][i]);
printf("%d\n",ans);
}
./Main.cpp: In function ‘int main()’:
./Main.cpp:10:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&m);
^