0_0_29979184_5029.cpp:9:4: error: 's' does not name a type
}s[maxn];
^
0_0_29979184_5029.cpp:64:1: error: expected '}' at end of input
}
^
0_0_29979184_5029.cpp: In member function 'int seg::main()':
0_0_29979184_5029.cpp:41:18: error: invalid types 'int[int]' for array subscript
s[cnt]=seg{a,c,b,1};//bottom line
^
0_0_29979184_5029.cpp:43:18: error: invalid types 'int[int]' for array subscript
s[cnt]=seg{a,c,d,-1};//top line
^
0_0_29979184_5029.cpp:47:22: error: 'cmp' was not declared in this scope
sort(s,s+cnt,cmp);
^
0_0_29979184_5029.cpp:57:43: error: invalid types 'int[int]' for array subscript
int l=lower_bound(x,x+res+1,s[i].l)-x;//find the index after discretization
^
0_0_29979184_5029.cpp:58:43: error: invalid types 'int[int]' for array subscript
int r=lower_bound(x,x+res+1,s[i].r)-x-1;//attention -1
^
0_0_29979184_5029.cpp:59:27: error: invalid types 'int[int]' for array subscript
update(l,r,s[i].s,1,0,res);
^
0_0_29979184_5029.cpp:60:31: error: invalid types 'int[int]' for array subscript
ans+=sum[1]*(s[i+1].h-s[i].h);
^
0_0_29979184_5029.cpp:60:38: error: invalid types 'int[int]' for array subscript
ans+=sum[1]*(s[i+1].h-s[i].h);
^
0_0_29979184_5029.cpp: At global scope:
0_0_29979184_5029.cpp:64:1: error: expected unqualified-id at end of input
}
^
|