F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_20612983_22966.cpp:13:10: error: stray '#' in program
     > 1 )#define L(x) ( x << 1 )#define R(x) ( x << 1 | 1 )#define BUG puts("here!!!") using namespace std; const int MAX = 100010;int X;struct circle{ int w,x,y,r;};circle c[MAX]; double yy(int id,int flag){    double d = sqrt(c[id].r*1.0*c[id].r - (X-c[id].x)*1.0*(X-c[id].x));    if( flag == 1 ) return c[id].y + d;    return c[id].y - d;} struct Sline{    int flag,id;    bool operator<(const Sline a)const    {        double y1 = yy(id, flag);        double y2 = yy(a.id, a.flag);        return y1 > y2 || y1 == y2 && flag > a.flag;            }}; set<Sline> s;set<Sline>::iterator pre,suc,it; struct event{ int x,id,flag;};event l[MAX]; bool cmp(event a,event b){    if( a.x == b.x )        return c[a.id].y > c[b.id].y;    return a.x < b.x;} void add_line(circle c, int &cnt ,int id){    l[cnt].id = id;    l[cnt].x = c.x - c.r;    l[cnt++].flag = 1;    l[cnt].id = id;    l[cnt].x = c.x + c.r;    l[cnt++].flag = -1;} void solve(int n){    s.clear();    Sline node;    for(int i=0; i<n; i++)    {        X = l[i].x;        if( l[i].flag == 1 )        {            node.id = l[i].id; node.flag = 1;            it = s.insert(node).first;            suc = pre = it;            suc++;            if( it == s.begin() || suc == s.end() )                c[it->id].w = 1;            else            {                pre--;                if( pre->id == suc->id )                    c[it->id].w = c[pre->id].w + 1;                else                    c[it->id].w = max( c[pre->id].w, c[suc->id].w);            }            node.flag = -1;            s.insert(node);        }        else        {            node.id = l[i].id; node.flag = 1;            s.erase(node);            node.flag = -1;            s.erase(node);        }    }}int main(){    int ncases,n;    int x1,x2,y1,y2,xx,yy,r;     while( ~scanf("%d",&n) )    {        int cnt = 0;        for(int i=0; i<n; i++)        {            scanf("%d%d%d",&c[i].x, &c[i].y, &c[i].r);            c[i].w = 0;            add_line(c[i],cnt,i);        }        sort(l,l+cnt,cmp);         solve(cnt);         int ans = 0;        for(int i=0; i<n; i++)            ans = max(ans, c[i].w);        printf("%d\n",ans);    } return 0;}
          ^
0_0_20612983_22966.cpp:13:33: error: stray '#' in program
     > 1 )#define L(x) ( x << 1 )#define R(x) ( x << 1 | 1 )#define BUG puts("here!!!") using namespace std; const int MAX = 100010;int X;struct circle{ int w,x,y,r;};circle c[MAX]; double yy(int id,int flag){    double d = sqrt(c[id].r*1.0*c[id].r - (X-c[id].x)*1.0*(X-c[id].x));    if( flag == 1 ) return c[id].y + d;    return c[id].y - d;} struct Sline{    int flag,id;    bool operator<(const Sline a)const    {        double y1 = yy(id, flag);        double y2 = yy(a.id, a.flag);        return y1 > y2 || y1 == y2 && flag > a.flag;            }}; set<Sline> s;set<Sline>::iterator pre,suc,it; struct event{ int x,id,flag;};event l[MAX]; bool cmp(event a,event b){    if( a.x == b.x )        return c[a.id].y > c[b.id].y;    return a.x < b.x;} void add_line(circle c, int &cnt ,int id){    l[cnt].id = id;    l[cnt].x = c.x - c.r;    l[cnt++].flag = 1;    l[cnt].id = id;    l[cnt].x = c.x + c.r;    l[cnt++].flag = -1;} void solve(int n){    s.clear();    Sline node;    for(int i=0; i<n; i++)    {        X = l[i].x;        if( l[i].flag == 1 )        {            node.id = l[i].id; node.flag = 1;            it = s.insert(node).first;            suc = pre = it;            suc++;            if( it == s.begin() || suc == s.end() )                c[it->id].w = 1;            else            {                pre--;                if( pre->id == suc->id )                    c[it->id].w = c[pre->id].w + 1;                else                    c[it->id].w = max( c[pre->id].w, c[suc->id].w);            }            node.flag = -1;            s.insert(node);        }        else        {            node.id = l[i].id; node.flag = 1;            s.erase(node);            node.flag = -1;            s.erase(node);        }    }}int main(){    int ncases,n;    int x1,x2,y1,y2,xx,yy,r;     while( ~scanf("%d",&n) )    {        int cnt = 0;        for(int i=0; i<n; i++)        {            scanf("%d%d%d",&c[i].x, &c[i].y, &c[i].r);            c[i].w = 0;            add_line(c[i],cnt,i);        }        sort(l,l+cnt,cmp);         solve(cnt);         int ans = 0;        for(int i=0; i<n; i++)            ans = max(ans, c[i].w);        printf("%d\n",ans);    } return 0;}
                                 ^
0_0_20612983_22966.cpp:13:60: error: stray '#' in program
     > 1 )#define L(x) ( x << 1 )#define R(x) ( x << 1 | 1 )#define BUG puts("here!!!") using namespace std; const int MAX = 100010;int X;struct circle{ int w,x,y,r;};circle c[MAX]; double yy(int id,int flag){    double d = sqrt(c[id].r*1.0*c[id].r - (X-c[id].x)*1.0*(X-c[id].x));    if( flag == 1 ) return c[id].y + d;    return c[id].y - d;} struct Sline{    int flag,id;    bool operator<(const Sline a)const    {        double y1 = yy(id, flag);        double y2 = yy(a.id, a.flag);        return y1 > y2 || y1 == y2 && flag > a.flag;            }}; set<Sline> s;set<Sline>::iterator pre,suc,it; struct event{ int x,id,flag;};event l[MAX]; bool cmp(event a,event b){    if( a.x == b.x )        return c[a.id].y > c[b.id].y;    return a.x < b.x;} void add_line(circle c, int &cnt ,int id){    l[cnt].id = id;    l[cnt].x = c.x - c.r;    l[cnt++].flag = 1;    l[cnt].id = id;    l[cnt].x = c.x + c.r;    l[cnt++].flag = -1;} void solve(int n){    s.clear();    Sline node;    for(int i=0; i<n; i++)    {        X = l[i].x;        if( l[i].flag == 1 )        {            node.id = l[i].id; node.flag = 1;            it = s.insert(node).first;            suc = pre = it;            suc++;            if( it == s.begin() || suc == s.end() )                c[it->id].w = 1;            else            {                pre--;                if( pre->id == suc->id )                    c[it->id].w = c[pre->id].w + 1;                else                    c[it->id].w = max( c[pre->id].w, c[suc->id].w);            }            node.flag = -1;            s.insert(node);        }        else        {            node.id = l[i].id; node.flag = 1;            s.erase(node);            node.flag = -1;            s.erase(node);        }    }}int main(){    int ncases,n;    int x1,x2,y1,y2,xx,yy,r;     while( ~scanf("%d",&n) )    {        int cnt = 0;        for(int i=0; i<n; i++)        {            scanf("%d%d%d",&c[i].x, &c[i].y, &c[i].r);            c[i].w = 0;            add_line(c[i],cnt,i);        }        sort(l,l+cnt,cmp);         solve(cnt);         int ans = 0;        for(int i=0; i<n; i++)            ans = max(ans, c[i].w);        printf("%d\n",ans);    } return 0;}
                                                            ^
0_0_20612983_22966.cpp:13:5: error: expected unqualified-id before '>' token
     > 1 )#define L(x) ( x << 1 )#define R(x) ( x << 1 | 1 )#define BUG puts("here!!!") using namespace std; const int MAX = 100010;int X;struct circle{ int w,x,y,r;};circle c[MAX]; double yy(int id,int flag){    double d = sqrt(c[id].r*1.0*c[id].r - (X-c[id].x)*1.0*(X-c[id].x));    if( flag == 1 ) return c[id].y + d;    return c[id].y - d;} struct Sline{    int flag,id;    bool operator<(const Sline a)const    {        double y1 = yy(id, flag);        double y2 = yy(a.id, a.flag);        return y1 > y2 || y1 == y2 && flag > a.flag;            }}; set<Sline> s;set<Sline>::iterator pre,suc,it; struct event{ int x,id,flag;};event l[MAX]; bool cmp(event a,event b){    if( a.x == b.x )        return c[a.id].y > c[b.id].y;    return a.x < b.x;} void add_line(circle c, int &cnt ,int id){    l[cnt].id = id;    l[cnt].x = c.x - c.r;    l[cnt++].flag = 1;    l[cnt].id = id;    l[cnt].x = c.x + c.r;    l[cnt++].flag = -1;} void solve(int n){    s.clear();    Sline node;    for(int i=0; i<n; i++)    {        X = l[i].x;        if( l[i].flag == 1 )        {            node.id = l[i].id; node.flag = 1;            it = s.insert(node).first;            suc = pre = it;            suc++;            if( it == s.begin() || suc == s.end() )                c[it->id].w = 1;            else            {                pre--;                if( pre->id == suc->id )                    c[it->id].w = c[pre->id].w + 1;                else                    c[it->id].w = max( c[pre->id].w, c[suc->id].w);            }            node.flag = -1;            s.insert(node);        }        else        {            node.id = l[i].id; node.flag = 1;            s.erase(node);            node.flag = -1;            s.erase(node);        }    }}int main(){    int ncases,n;    int x1,x2,y1,y2,xx,yy,r;     while( ~scanf("%d",&n) )    {        int cnt = 0;        for(int i=0; i<n; i++)        {            scanf("%d%d%d",&c[i].x, &c[i].y, &c[i].r);            c[i].w = 0;            add_line(c[i],cnt,i);        }        sort(l,l+cnt,cmp);         solve(cnt);         int ans = 0;        for(int i=0; i<n; i++)            ans = max(ans, c[i].w);        printf("%d\n",ans);    } return 0;}
     ^
0_0_20612983_22966.cpp:13:554: error: 'set' does not name a type
     > 1 )#define L(x) ( x << 1 )#define R(x) ( x << 1 | 1 )#define BUG puts("here!!!") using namespace std; const int MAX = 100010;int X;struct circle{ int w,x,y,r;};circle c[MAX]; double yy(int id,int flag){    double d = sqrt(c[id].r*1.0*c[id].r - (X-c[id].x)*1.0*(X-c[id].x));    if( flag == 1 ) return c[id].y + d;    return c[id].y - d;} struct Sline{    int flag,id;    bool operator<(const Sline a)const    {        double y1 = yy(id, flag);        double y2 = yy(a.id, a.flag);        return y1 > y2 || y1 == y2 && flag > a.flag;            }}; set<Sline> s;set<Sline>::iterator pre,suc,it; struct event{ int x,id,flag;};event l[MAX]; bool cmp(event a,event b){    if( a.x == b.x )        return c[a.id].y > c[b.id].y;    return a.x < b.x;} void add_line(circle c, int &cnt ,int id){    l[cnt].id = id;    l[cnt].x = c.x - c.r;    l[cnt++].flag = 1;    l[cnt].id = id;    l[cnt].x = c.x + c.r;    l[cnt++].flag = -1;} void solve(int n){    s.clear();    Sline node;    for(int i=0; i<n; i++)    {        X = l[i].x;       


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-30 01:16:30, Gzip enabled