博弈深搜是个啥子??
by 卜卜 @ 2017-03-06 08:59:38
alpha-beta搜索 0.0【Orz】
这个DP应该和就是按照搜索思想改来吧【瞎想了一下,纯口胡 = =】
by 张仪 @ 2017-03-31 21:09:51
看我的吧
by ergeda @ 2017-05-02 20:45:23
@[王钊文](/space/show?uid=19623)
这显然不满足博弈
by 1234KID @ 2017-05-23 21:48:27
记忆化搜索可以吗
附代码
```cpp
#include<algorithm>
#include<stdio.h>
#include<cstring>
using namespace std;
int n,i,j,f[205][205],a[205],ans[205];
int ask(int x,int y)
{
if(f[x][y]) return f[x][y];
if(x==y) f[x][y]=a[x];
else
f[x][y]=ans[y]-ans[x-1]-min(ask(x,y-1),ask(x+1,y));
return f[x][y];
}
int main()
{
scanf("%d",&n);
memset(f,0,sizeof(f));
for(i=1;i<=n;i++)
{scanf("%d",&a[i]);ans[i]=ans[i-1]+a[i];}
printf("%d ",ask(1,n));
printf("%d",ans[n]-f[1][n]);
}
```
by topoier @ 2017-08-14 14:40:02
@[JustinJTQ](/space/show?uid=31162)
同志!咱俩思想一样。
by Flokirie @ 2017-10-25 15:46:32