QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#217233#4429. Gebyte's GrindVicBVicCompile Error//C++141.4kb2023-10-16 17:21:262023-10-16 17:21:26

Judging History

你现在查看的是最新测评结果

  • [2023-10-16 17:21:26]
  • 评测
  • [2023-10-16 17:21:26]
  • 提交

answer

#include <iostream>
#define int long long
using namespace std;

const int MV = 1ll<<(60);
const int MN = 2e6+5;


///"desi vorbest pe inteles
///eu nu te pot pricepe." Luka, 2099
struct Luka{

    //max(Ha+b, c)
    int a,b,c;

    Luka operator *( const Luka &other)
    {
        Luka res;
        res.a=a*other.a;
        res.b=b*other.a+other.b;
        res.c=max(c*other.a+ other.b, other.c);
        return res;
    }

    int val(int h)
    {
        return max(h*a + b, c);
    }

    int calcLim(int otherLim)
    {
        int st=-MV, dr=MV;
        int mid=(st+dr)/2;

        while(st!=dr)
        {
            if(val(mid)>otherLim) dr=mid;
            else st=mid+1;
            mid=(st+dr)/2;
        }
        return st;
    }
};

struct Arbnod{
    Luka goodFunc;
    int lim;
    Arbnod()
    {

    }

    static Arbnod Beast(int i)
    {

    }
    Arbnod operator *(const Arbnod &other)
    {
        Arbnod res;
        res.goodFunc=goodFunc*other.goodFunc;
        res.lim=max(lim,goodFunc.calcLim(other.lim));
        return res;
    }
};

struct Arbint{
    vector<Arbnod> arb;
    int offset;
    Arbint(int n)
    {
        offset=1;
        while(offset<n) offset<<=1;
        arb.assign(offset,)
    }
};

int32_t main()
{
    int t=1;
    cin>>t;
    while(t--)
    {
        solve();
    }
    return 0;
}

详细

answer.code: In static member function ‘static Arbnod Arbnod::Beast(long long int)’:
answer.code:56:5: warning: no return statement in function returning non-void [-Wreturn-type]
   56 |     }
      |     ^
answer.code: At global scope:
answer.code:67:5: error: ‘vector’ does not name a type
   67 |     vector<Arbnod> arb;
      |     ^~~~~~
answer.code: In constructor ‘Arbint::Arbint(long long int)’:
answer.code:73:9: error: ‘arb’ was not declared in this scope
   73 |         arb.assign(offset,)
      |         ^~~
answer.code:73:27: error: expected primary-expression before ‘)’ token
   73 |         arb.assign(offset,)
      |                           ^
answer.code: In function ‘int32_t main()’:
answer.code:83:9: error: ‘solve’ was not declared in this scope
   83 |         solve();
      |         ^~~~~