记录编号 |
74922 |
评测结果 |
AAAAAAAAAA |
题目名称 |
1427.zwei |
最终得分 |
100 |
用户昵称 |
hzx |
是否通过 |
通过 |
代码语言 |
C++ |
运行时间 |
5.449 s |
提交时间 |
2013-10-26 18:21:15 |
内存使用 |
0.69 MiB |
显示代码纯文本
# include <fstream>
using namespace std;
ifstream fin("zwei.in");
ofstream fout("zwei.out");
int n,m,a[100002];
int c;
int main(){
int x;int y,temp;
fin>>n>>m;
for(int i=1;i<=n;i++)
fin>>a[i];
for(int i=1;i<=m;i++){
fin>>c>>x>>y;
if(c==0) a[x]=y;
else{
temp=a[x];
for(int j=x+1;j<=y;j++) temp=temp^a[j];
fout<<temp<<endl;
}
}
fin.close();
fout.close();
return 0;
}