RE*ALL求助

P1464 Function

过了吗?
by sssscy_free_stdio @ 2023-07-16 15:48:06


@[shenchenyi5](/user/905133) e不是,还是RE。
by HappyDavid @ 2023-07-16 15:48:08


啥叫“e不是”?qwq
by sssscy_free_stdio @ 2023-07-16 15:49:23


没看懂qwq
by sssscy_free_stdio @ 2023-07-16 15:50:07


有测试点过吗?
by sssscy_free_stdio @ 2023-07-16 15:50:47


@[shenchenyi5](/user/905133) 没有…… e是“额”的意思QAQ~
by HappyDavid @ 2023-07-16 15:52:34


@[HappyDavid](/user/738761) 一个都没过TAT~
by HappyDavid @ 2023-07-16 15:53:25


我代码这么写的,可以看看: ```c++ #include<bits/stdc++.h> using namespace std; long long a,b,c,f[30][30][30]; long long w(long long a,long long b,long long c) { if(a<=0||b<=0||c<=0) { return 1; } if(a>20||b>20||c>20) { return w(20,20,20); } if(f[a][b][c]) { return f[a][b][c]; } if(a<b&&b<c) { return f[a][b][c]=w(a,b,c-1)+w(a,b-1,c-1)-w(a,b-1,c); } else { return f[a][b][c]=w(a-1,b,c)+w(a-1,b-1,c)+w(a-1,b,c-1)-w(a-1,b-1,c-1); } } int main() { while(scanf("%lld%lld%lld",&a,&b,&c)==3) { if(a==-1&&b==-1&&c==-1) { break; } printf("w(%lld, %lld, %lld) = %lld\n",a,b,c,w(a,b,c)); } return 0; }
by sssscy_free_stdio @ 2023-07-16 15:54:32


在让我看下你现在的代码
by sssscy_free_stdio @ 2023-07-16 15:57:20


@[shenchenyi5](/user/905133) 肉眼没看出问题?
by HappyDavid @ 2023-07-16 15:57:39


上一页 | 下一页