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_20612933_28982.cpp:3:25: error: stray '#' in program
     using namespace std;#define N 200020 struct Node {      int x,y,lt,id ;  }point[N]; int n,len,maxlp[N],by[N];int cmp(Node a,Node b) {      if(a.x != b.x)           return a.x < b.x ;      if(a.y == b.y)           return a.lt > b.lt ;      return a.y < b.y ;           }int find(int len,int _y) {      int mid, left = 1, right = len  ;      while(left <= right) {          mid = (left+right) >> 1 ;           if(by[mid] >= _y)             right = mid-1 ;          else left = mid+1 ;      }                         return  left ; } int main() {    while(scanf("%d",&n) && n) {       for(int i=0;i<n;i++) {           scanf("%d%d",&point[2*i].x,&point[2*i].y);             point[2*i].lt = 1 ;               scanf("%d%d",&point[2*i+1].x,&point[2*i+1].y);             point[2*i+1].lt = 0 ;               point[2*i].id = point[2*i+1].id = i ;        }           n *= 2 ;       sort(point,point+n,cmp) ;        len = 0 ;       for(int i=0;i<n;i++) {           if(point[i].lt == 1) maxlp[point[i].id] = find(len,point[i].y) ;                   else {              int tmp = maxlp[point[i].id] ;              if(tmp > len) by[++len] = point[i].y ;              else by[tmp] = min(by[tmp],point[i].y) ;                              }       }         printf("%d\n",len);    }    return 0;        }
                         ^
0_0_20612933_28982.cpp:3:26: error: 'define' does not name a type
     using namespace std;#define N 200020 struct Node {      int x,y,lt,id ;  }point[N]; int n,len,maxlp[N],by[N];int cmp(Node a,Node b) {      if(a.x != b.x)           return a.x < b.x ;      if(a.y == b.y)           return a.lt > b.lt ;      return a.y < b.y ;           }int find(int len,int _y) {      int mid, left = 1, right = len  ;      while(left <= right) {          mid = (left+right) >> 1 ;           if(by[mid] >= _y)             right = mid-1 ;          else left = mid+1 ;      }                         return  left ; } int main() {    while(scanf("%d",&n) && n) {       for(int i=0;i<n;i++) {           scanf("%d%d",&point[2*i].x,&point[2*i].y);             point[2*i].lt = 1 ;               scanf("%d%d",&point[2*i+1].x,&point[2*i+1].y);             point[2*i+1].lt = 0 ;               point[2*i].id = point[2*i+1].id = i ;        }           n *= 2 ;       sort(point,point+n,cmp) ;        len = 0 ;       for(int i=0;i<n;i++) {           if(point[i].lt == 1) maxlp[point[i].id] = find(len,point[i].y) ;                   else {              int tmp = maxlp[point[i].id] ;              if(tmp > len) by[++len] = point[i].y ;              else by[tmp] = min(by[tmp],point[i].y) ;                              }       }         printf("%d\n",len);    }    return 0;        }
                          ^
0_0_20612933_28982.cpp:3:79: error: 'point' does not name a type
     using namespace std;#define N 200020 struct Node {      int x,y,lt,id ;  }point[N]; int n,len,maxlp[N],by[N];int cmp(Node a,Node b) {      if(a.x != b.x)           return a.x < b.x ;      if(a.y == b.y)           return a.lt > b.lt ;      return a.y < b.y ;           }int find(int len,int _y) {      int mid, left = 1, right = len  ;      while(left <= right) {          mid = (left+right) >> 1 ;           if(by[mid] >= _y)             right = mid-1 ;          else left = mid+1 ;      }                         return  left ; } int main() {    while(scanf("%d",&n) && n) {       for(int i=0;i<n;i++) {           scanf("%d%d",&point[2*i].x,&point[2*i].y);             point[2*i].lt = 1 ;               scanf("%d%d",&point[2*i+1].x,&point[2*i+1].y);             point[2*i+1].lt = 0 ;               point[2*i].id = point[2*i+1].id = i ;        }           n *= 2 ;       sort(point,point+n,cmp) ;        len = 0 ;       for(int i=0;i<n;i++) {           if(point[i].lt == 1) maxlp[point[i].id] = find(len,point[i].y) ;                   else {              int tmp = maxlp[point[i].id] ;              if(tmp > len) by[++len] = point[i].y ;              else by[tmp] = min(by[tmp],point[i].y) ;                              }       }         printf("%d\n",len);    }    return 0;        }
                                                                               ^
0_0_20612933_28982.cpp:3:105: error: 'N' was not declared in this scope
     using namespace std;#define N 200020 struct Node {      int x,y,lt,id ;  }point[N]; int n,len,maxlp[N],by[N];int cmp(Node a,Node b) {      if(a.x != b.x)           return a.x < b.x ;      if(a.y == b.y)           return a.lt > b.lt ;      return a.y < b.y ;           }int find(int len,int _y) {      int mid, left = 1, right = len  ;      while(left <= right) {          mid = (left+right) >> 1 ;           if(by[mid] >= _y)             right = mid-1 ;          else left = mid+1 ;      }                         return  left ; } int main() {    while(scanf("%d",&n) && n) {       for(int i=0;i<n;i++) {           scanf("%d%d",&point[2*i].x,&point[2*i].y);             point[2*i].lt = 1 ;               scanf("%d%d",&point[2*i+1].x,&point[2*i+1].y);             point[2*i+1].lt = 0 ;               point[2*i].id = point[2*i+1].id = i ;        }           n *= 2 ;       sort(point,point+n,cmp) ;        len = 0 ;       for(int i=0;i<n;i++) {           if(point[i].lt == 1) maxlp[point[i].id] = find(len,point[i].y) ;                   else {              int tmp = maxlp[point[i].id] ;              if(tmp > len) by[++len] = point[i].y ;              else by[tmp] = min(by[tmp],point[i].y) ;                              }       }         printf("%d\n",len);    }    return 0;        }
                                                                                                         ^
0_0_20612933_28982.cpp:3:111: error: 'N' was not declared in this scope
     using namespace std;#define N 200020 struct Node {      int x,y,lt,id ;  }point[N]; int n,len,maxlp[N],by[N];int cmp(Node a,Node b) {      if(a.x != b.x)           return a.x < b.x ;      if(a.y == b.y)           return a.lt > b.lt ;      return a.y < b.y ;           }int find(int len,int _y) {      int mid, left = 1, right = len  ;      while(left <= right) {          mid = (left+right) >> 1 ;           if(by[mid] >= _y)             right = mid-1 ;          else left = mid+1 ;      }                         return  left ; } int main() {    while(scanf("%d",&n) && n) {       for(int i=0;i<n;i++) {           scanf("%d%d",&point[2*i].x,&point[2*i].y);             point[2*i].lt = 1 ;               scanf("%d%d",&point[2*i+1].x,&point[2*i+1].y);             point[2*i+1].lt = 0 ;               point[2*i].id = point[2*i+1].id = i ;        }           n *= 2 ;       sort(point,point+n,cmp) ;        len = 0 ;       for(int i=0;i<n;i++) {           if(point[i].lt == 1) maxlp[point[i].id] = find(len,point[i].y) ;                   else {              int tmp = maxlp[point[i].id] ;              if(tmp > len) by[++len] = point[i].y ;              else by[tmp] = min(by[tmp],point[i].y) ;                              }       }         printf("%d\n",len);    }    return 0;        }
                                                                                                               ^
0_0_20612933_28982.cpp:3:122: error: 'Node' was not declared in this scope
     using namespace std;#define N 200020 struct Node {      int x,y,lt,id ;  }point[N]; int n,len,maxlp[N],by[N];int cmp(Node a,Node b) {      if(a.x != b.x)           return a.x < b.x ;      if(a.y == b.y)           return a.lt > b.lt ;      return a.y < b.y ;           }int find(int len,int _y) {      int mid, left = 1, right = len  ;      while(left <= right) {          mid = (left+right) >> 1 ;           if(by[mid] >= _y)             right = mid-1 ;          else left = mid+1 ;      }                         return  left ; } int main() {    while(scanf("%d",&n) && n) {       for(int i=0;i<n;i++) {           scanf("%d%d",&point[2*i].x,&point[2*i].y);             point[2*i].lt = 1 ;               scanf("%d%d",&point[2*i+1].x,&point[2*i+1].y);             point[2*i+1].lt = 0 ;               point[2*i].id = point[2*i+1].id = i ;        }           n *= 2 ;       sort(point,point+n,cmp) ;        len = 0 ;       for(int i=0;i<n;i++) {           if(point[i].lt == 1) maxlp[point[i].id] = find(len,point[i].y) ;                   else {              int tmp = maxlp[point[i].id] ;              if(tmp > len) by[++len] = point[i].y ;              else by[tmp] = min(by[tmp],point[i].y) ;                              }       }         printf("%d\n",len);    }    return 0;        }
                                                                                                                          ^
0_0_20612933_28982.cpp:3:129: error: 'Node' was not declared in this scope
     using namespace std;#define N 200020 struct Node {      int x,y,lt,id ;  }point[N]; int n,len,maxlp[N],by[N];int cmp(Node a,Node b) {      if(a.x != b.x)           return a.x < b.x ;      if(a.y == b.y)           return a.lt > b.lt ;      return a.y < b.y ;           }int find(int len,int _y) {      int mid, left = 1, right = len  ;      while(left <= right) {          mid = (left+right) >> 1 ;           if(by[mid] >= _y)             right = mid-1 ;          else left = mid+1 ;      }                         return  left ; } int main() {    while(scanf("%d",&n) && n) {       for(int i=0;i<n;i++) {           scanf("%d%d",&point[2*i].x,&point[2*i].y);             point[2*i].lt = 1 ;               scanf("%d%d",&point[2*i+1].x,&point[2*i+1].y);             point[2*i+1].lt = 0 ;               point[2*i].id = point[2*i+1].id = i ;        }           n *= 2 ;       sort(point,point+n,cmp) ;        len = 0 ;       for(int i=0;i<n;i++) {           if(point[i].lt == 1) maxlp[point[i].id] = find(len,point[i].y) ;                   else {              int tmp = maxlp[point[i].id] ;              if(tmp > len) by[++len] = point[i].y ;              else by[tmp] = min(by[tmp],point[i].y) ;                              }       }         printf("%d\n",len);    }    return 0;        }
                                                                                                                                 ^
0_0_20612933_28982


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-26 09:29:12, Gzip enabled