0_0_29909740_4953\Main.java:1: 错误: 非法字符: '#'
#include<iostream>
^
0_0_29909740_4953\Main.java:1: 错误: 需要class, interface或enum
#include<iostream>
^
0_0_29909740_4953\Main.java:2: 错误: 非法字符: '#'
#include<string>
^
0_0_29909740_4953\Main.java:3: 错误: 非法字符: '#'
#include<cstdio>
^
0_0_29909740_4953\Main.java:4: 错误: 非法字符: '#'
#include<cstring>
^
0_0_29909740_4953\Main.java:5: 错误: 非法字符: '#'
#include<cmath>
^
0_0_29909740_4953\Main.java:6: 错误: 非法字符: '#'
#include<algorithm>
^
0_0_29909740_4953\Main.java:8: 错误: 需要class, interface或enum
typedef long long ll;
^
0_0_29909740_4953\Main.java:9: 错误: 需要class, interface或enum
const int maxn=2e5;
^
0_0_29909740_4953\Main.java:10: 错误: 非法字符: '#'
#define mod 1000000007
^
0_0_29909740_4953\Main.java:10: 错误: 需要class, interface或enum
#define mod 1000000007
^
0_0_29909740_4953\Main.java:12: 错误: 需要class, interface或enum
int n,Q;
^
0_0_29909740_4953\Main.java:26: 错误: 需要class, interface或enum
void Build(int rt,int L,int R){
^
0_0_29909740_4953\Main.java:29: 错误: 需要class, interface或enum
return;
^
0_0_29909740_4953\Main.java:30: 错误: 需要class, interface或enum
}
^
0_0_29909740_4953\Main.java:32: 错误: 需要class, interface或enum
Build(rt*2,L,mid);
^
0_0_29909740_4953\Main.java:33: 错误: 需要class, interface或enum
Build(rt*2+1,mid+1,R);
^
0_0_29909740_4953\Main.java:34: 错误: 需要class, interface或enum
tree[rt]=max(tree[rt*2],tree[rt*2+1]);
^
0_0_29909740_4953\Main.java:35: 错误: 需要class, interface或enum
}
^
0_0_29909740_4953\Main.java:40: 错误: 需要class, interface或enum
return ;
^
0_0_29909740_4953\Main.java:41: 错误: 需要class, interface或enum
}
^
0_0_29909740_4953\Main.java:43: 错误: 需要class, interface或enum
if(x<=mid) Update1(rt*2,L,mid,x,num);
^
0_0_29909740_4953\Main.java:44: 错误: 需要class, interface或enum
else Update1(rt*2+1,mid+1,R,x,num);
^
0_0_29909740_4953\Main.java:45: 错误: 需要class, interface或enum
tree[rt]=max(tree[rt*2]/*左孩子*/,tree[rt*2+1])/*右孩子*/;//更新节点 //因为底部节点变值,那么根部也会跟着变值
^
0_0_29909740_4953\Main.java:46: 错误: 需要class, interface或enum
}
^
0_0_29909740_4953\Main.java:50: 错误: 需要class, interface或enum
if(l<=L&&R<=r) return tree[rt];//如果一开始访问最顶部节点就超了,那么就返回顶部值(因为线段树存的为区间的问题!!!!)
^
0_0_29909740_4953\Main.java:52: 错误: 需要class, interface或enum
int mid=(L+R)/2;
^
0_0_29909740_4953\Main.java:53: 错误: 需要class, interface或enum
if(l<=mid) sum=max(sum,Query(rt*2,L,mid,l,r));//返回左孩子
^
0_0_29909740_4953\Main.java:54: 错误: 需要class, interface或enum
if(r>mid) sum=max(sum,Query(rt*2+1,mid+1,R,l,r));//返回右孩子
^
0_0_29909740_4953\Main.java:55: 错误: 需要class, interface或enum
return sum;//返回区间和//注意这里也可以返回RMQ问题只需要改为:
^
0_0_29909740_4953\Main.java:56: 错误: 需要class, interface或enum
}
^
0_0_29909740_4953\Main.java:75: 错误: 需要class, interface或enum
int l,r;
^
0_0_29909740_4953\Main.java:76: 错误: 需要class, interface或enum
while(~scanf("%d %d",n,Q)){
^
0_0_29909740_4953\Main.java:78: 错误: 需要class, interface或enum
Build(1,1,n);
^
0_0_29909740_4953\Main.java:79: 错误: 需要class, interface或enum
memset(tree,0,sizeof(tree));
^
0_0_29909740_4953\Main.java:80: 错误: 需要class, interface或enum
while(Q--){
^
0_0_29909740_4953\Main.java:82: 错误: 需要class, interface或enum
if(ch[0]=='U') Update1(1,1,n,l,r);
^
0_0_29909740_4953\Main.java:83: 错误: 需要class, interface或enum
else printf("%d\n",Query(1,1,n,l,r));
^
0_0_29909740_4953\Main.java:84: 错误: 需要class, interface或enum
}
^
0_0_29909740_4953\Main.java:87: 错误: 需要class, interface或enum
}
^
40 个错误
|