您的数组开的太大了捏
by EastSnowLotus @ 2022-08-26 21:21:48
@[HCGZS](/user/730477) 您为蛤要开这么大的数组啊?你是因为这个CE掉的,装不下了。一般数组要开在 $1e7$ 及以下啊......
by HotDogSeller @ 2022-08-26 21:23:13
@[BTOI](/user/540822)
@[CoCo_Candy](/user/337878)
收到
## 我主要是怕超
by HC_Lin @ 2022-08-26 21:28:47
@[BTOI](/user/540822)
@[CoCo_Candy](/user/337878)
[由此入](https://www.luogu.com.cn/record/85217145)
by HC_Lin @ 2022-08-26 21:29:43
@[BTOI](/user/540822)
@[CoCo_Candy](/user/337878)
```cpp
#include<iostream>
using namespace std;
int ia[9999999];
int ib[9999999];
int ic[9999999];
int ans[9999999];
int i=1;
int w(int a,int b,int c){
if(a<=0||b<=0||c<=0){
ia[i]=a;
ib[i]=b;
ic[i]=c;
ans[i]=1;
i++;
return 0;
}
else if(a>20||b>20||c>20){
w(20,20,20);
i++;
return 0;
}
else if(a<b&&b<c){
int d=w(a,b,c-1);
int e=w(a,b-1,c-1);
int f=w(a,b-1,c);
int g=d+e-f;
ia[i]=a;
ib[i]=b;
ic[i]=c;
ans[i]=g;
i++;
return 0;
}
int d=w(a-1,b,c);
int e=w(a-1,b-1,c);
int f=w(a-1,b,c-1);
int g=w(a-1,b-1,c-1);
int h=d+e+f-g;
ia[i]=a;
ib[i]=b;
ic[i]=c;
ans[i]=h;
i++;
return 0;
}
int main(){
int a,b,c,i=1;
for(;;){
cin>>a>>b>>c;
if(a==-1&&b==-1&&c==-1) break;
else w(a,b,c);
}
for(int d=1;d<=i;d++) cout<<"w("<<ia[d]<<", "<<ib[d]<<", "<<ic[d]<<") = "<<ans[d]<<endl;
}
```
by HC_Lin @ 2022-08-26 21:30:21
@[HCGZS](/user/730477) 试试把数组调小一点再运行,试试能不能玄学跑过去
by HotDogSeller @ 2022-08-26 21:31:03
不行再调小,知道不是 $MLE$ 为止
by HotDogSeller @ 2022-08-26 21:31:57
我谔谔,map 了解一下?
by EastSnowLotus @ 2022-08-27 07:58:14
@[HCGZS](/user/730477) 还有,您不需要动不动全 at 一遍,总共一次我就可以看得见捏。
by EastSnowLotus @ 2022-08-27 08:02:31
@[BTOI](/user/540822)
玄学这种东西,我还是...
# 信的
只是,这次好像不起作用了
by HC_Lin @ 2022-08-27 17:00:06