倒计时66天

(0条未读通知) 牛客竞赛_ACM/NOI/CSP/CCPC/ICPC算法编程高难度练习赛_牛客竞赛OJ (nowcoder.com)

补题:qaq,5个小时,13个题,对3题,,,,麻了╥﹏╥...,,每日一问,什么时候是个头啊啊啊啊!!!

b/c/e/g

b:

c:

#include 
using namespace std;
const int N = 1e5 + 5;
const int inf = 0x3f3f3f3f;
#define int long long
int a[N],b[N];
void solve()
{
    int n,q,t,cn=0,m;
    cin>>n>>q>>t;
    for(int i=0;i>a[i];
    sort(a,a+n);
    for(int i=0;i>m;
        int x=m/t;
        if(x>=n)cout<

e:

g:

#include 
using namespace std;
const int N = 1e5 + 5;
const int inf = 0x3f3f3f3f;
#define int long long
struct node{
    int x,y;
}a[N];
bool cmp(node p,node q)
{
    return p.x>t;
    while(t--)
    {
        int m,n,max1=-inf;
        cin>>m>>n;
        for(int i=1;i<=m;i++)
        {
            cin>>a[i].x>>a[i].y;
        }
        sort(a+1,a+m+1,cmp);
        for(int i=1;i<=m;i++)
        {
            a[i].y+=a[i-1].y;
            a[i].x-=a[i].y;
            if(a[i].x<=n)max1=max(max1,a[i].y+n);
        }
        if(max1<=0)cout<

待续,,,,

你可能感兴趣的:(c++)