求助qwq评测点3一直加载

P1594 护卫队

代码 ```cpp #include<bits/stdc++.h> #define maxn 10005 #define ll long long using namespace std; ll W,tw,n; double ts,X; double f[maxn]; struct edge { ll w; double s; }a[maxn]; inline ll read() { ll x=0,f=1;char c=getchar(); while(c<'0'||c>'9'){if(c=='=')f=-1;c=getchar();} while(c>='0'&&c<='9'){x=x*10+c-'0';c=getchar();} return x*f; } int main() { W=read();X=read(),n=read(); for(int i=1;i<=n;++i) a[i].w=read(),scanf("%lf",&a[i].s),a[i].s=X/a[i].s; for(int i=1;i<=n;++i) { tw=a[i].w,ts=a[i].s; f[i]=f[i-1]+a[i].s; for(int j=i-1;a[j].w+tw<=W&&j>=1;--j) { ts=a[j].s<ts?ts:a[j].s; f[i]=f[j-1]+ts<f[i]?f[j-1]+ts:f[i]; tw+=a[j].w; } } printf("%.1lf ",f[n]*60); return 0; } ```
by Jy_Amoy @ 2018-10-30 16:43:45


emmm我数组开大了一点然后最后输出改成60.0就过了有点懵
by Jy_Amoy @ 2018-10-30 16:50:39


@[小埋好萌](/space/show?uid=32767) 建议重交,现在评测机确实有些问题
by StudyingFather @ 2018-10-30 16:59:57


@[StudyingFather](/space/show?uid=22030) 重交A了 谢谢了
by Jy_Amoy @ 2018-10-30 17:04:39


|