0_0_36576806_28822.cpp:2:13: error: expected ',' or ';' before 'long'
#define int long long
^
0_0_36576806_28822.cpp:5:1: note: in expansion of macro 'int'
int tree[N];//数组开到pow(2,(int)log2(最大值)+1)即可;
^
0_0_36576806_28822.cpp: In function 'void update(long long int, long long int, long long int)':
0_0_36576806_28822.cpp:12:16: error: 'tree' was not declared in this scope
while(idx<=n) tree[idx]+=val,idx+=lowbit(idx);
^
0_0_36576806_28822.cpp: In function 'long long int query(long long int)':
0_0_36576806_28822.cpp:17:18: error: 'tree' was not declared in this scope
while(idx) ans+=tree[idx],idx-=lowbit(idx);
^
0_0_36576806_28822.cpp: In function 'int main()':
0_0_36576806_28822.cpp:23:11: error: 'M' was not declared in this scope
int l=M,r=M+1,idx=1,x,m=0;
^
0_0_36576806_28822.cpp:26:20: error: 's' was not declared in this scope
scanf("%s",s);
^
0_0_36576806_28822.cpp:29:13: error: 'a' was not declared in this scope
a[l]=idx;
^
0_0_36576806_28822.cpp:29:18: error: 'idx' was not declared in this scope
a[l]=idx;
^
0_0_36576806_28822.cpp:30:13: error: 'b' was not declared in this scope
b[idx]=l;
^
0_0_36576806_28822.cpp:33:13: error: 'm' was not declared in this scope
m++;
^
0_0_36576806_28822.cpp:35:20: error: 'r' was not declared in this scope
update(r,1,N-1);
^
0_0_36576806_28822.cpp:36:13: error: 'a' was not declared in this scope
a[r]=idx;
^
0_0_36576806_28822.cpp:36:18: error: 'idx' was not declared in this scope
a[r]=idx;
^
0_0_36576806_28822.cpp:37:13: error: 'b' was not declared in this scope
b[idx]=r;
^
0_0_36576806_28822.cpp:40:13: error: 'm' was not declared in this scope
m++;
^
0_0_36576806_28822.cpp:42:25: error: 'x' was not declared in this scope
scanf("%d",&x);
^
0_0_36576806_28822.cpp:43:20: error: 'b' was not declared in this scope
update(b[x],-1,N-1);
^
0_0_36576806_28822.cpp:44:13: error: 'm' was not declared in this scope
m--;
^
0_0_36576806_28822.cpp:47:33: error: 'm' was not declared in this scope
printf("%d\n",find((m+1)/2+(m+1)%2));
^
|