救救我!60pts裂开了
查看原帖
救救我!60pts裂开了
953589
coderJerry楼主2023/10/14 21:26

崩溃赛时没调出来

#include <bits/stdc++.h>
using namespace std;
struct node
{
	int a,b,l;
}f[11];
int n,t,maxn=-1,sum=0;
int main()
{
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>f[i].a>>f[i].b;
        f[i].l=100-(100/f[i].a*f[i].b);
        sum+=(100-f[i].l);
        maxn=max(maxn,f[i].l);
    }
    cin>>t;
    if(sum>=t) cout<<"Already Au."<<endl;
    else
    {
        for(int i=1;i<=n;i++)
        {
            if(sum+f[i].l<t) cout<<"NaN"<<endl;
            else cout<<(int)(ceil(t-sum)/(100/f[i].a))+1<<endl;
        }
    }
    return 0;
}
2023/10/14 21:26
加载中...