求助为何UKE

CF19B Checkout Assistant

lovely_glg @ 2023-07-12 11:12:28

RT,是我WA了还是怎么了(不是说RMJ好了吗)

#include<bits/stdc++.h>
#define int long long
using namespace std;
int ans=2e12+10,f[4010],v[4010],w[4010];
signed main()
{
    int m,T=0;
    cin>>m;
    for(int i=1;i<=m;i++)
    {
        cin>>v[i]>>w[i];
        v[i]++;
        T=max(T,v[i]);
    }
    T+=m;
    memset(f,0x7f7f,sizeof(f));
    f[0]=0;
    for(int i=1;i<=m;i++)
    {
        for(int j=T;j>=v[i];j--)
        {
            f[j]=min(f[j],f[j-v[i]]+w[i]);
        }
    }
    for(int i=m;i<=T;i++)
    {
        ans=min(ans,f[i]);
    }       
    cout<<ans;
    return 0;
}

by GeorgeAAAADHD @ 2023-07-12 11:15:00

好像是服务器炸了,我也莫名UKE


by lovely_glg @ 2023-07-12 11:16:31

@GeorgeAAAADHD

多谢大佬回复


by WsW_ @ 2023-07-12 11:17:52

@EGOI

\mathtt{Cu}

by cjh20090318 @ 2023-07-12 11:24:40

我甚至本站都登不进去。


|