C++#include<bits/stdc++.h>
using namespace std;
double kai=10000,eps=1,jiang=0.92,fw;//fw 记得赋值
mt19937 rd(time(0));
#define bu t/kai*(rd()%(2*(int)fw)*1.0-fw)
#define gl 1.0*rand()/RAND_MAX
int ans,sx;//题目要求时开 double
int cha(int x)
{
return ans;
}
signed main()
{
srand(20090918);
sx=;//
fw=;//
ans=cha(sx);
while (1.0*clock()/CLOCKS_PER_SEC<0.9)
{
int nw=ans,x=sx;
for(double t=kai;t>eps;t*=jiang)
{
int o1=x+bu,k;
while(o1∈[?,?]) o1=x+bu;
k=cha(o1);
if(k>ans) ans=k,sx=o1;
if(k>nw||exp((k-nw)/(t/kai))>gl) x=o1;
}
}
cout<<ans;
return 0;
}