Блог пользователя addict_0x0F

Автор addict_0x0F, история, 5 месяцев назад, По-английски

I have been trying to solve this Problem F. Here i am using set of custom data as below

struct data{
    ll x,y;
    int n;
    bool operator()(const data& a, const data& b){
        return (a.x==b.x)?(a.y<b.y):(a.x<b.x);
    }
    friend bool operator < (const data& a, const data& b){
        return (a.x==b.x)?(a.y<b.y):(a.x<b.x);
    }
    friend bool operator > (const data& a, const data& b){
        return (a.x==b.x)?(a.y>b.y):(a.x>b.x);
    }
};
set<data> st;

I am doing Insert, erase, lower_bound operation on this set. which is working fine on my Ubantu, but giving compilation error as "template argument 1 is invalid". The problem is in the set data structure so tried to debug it from this stackoverflow thread,tried to subit it in different c++ virsions too,but none of them is working,(some of it are working fine on my machine, but not on atcoder judge.

My submissions one. and another implementation of set::comp()

HELP Thanks in Advance;

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится