版本比较
4.10 总结
正文
增加 5 行删除 5 行
32 行未改动3334353637383940414243444546474812 行未改动61626364656667686919 行未改动89909192939495969746 行未改动32 行未改动while(q --){int op,l,r;cin >> op >> l >> r;if(op == 1) a[l] = r;//操作1else{int cnt,ans = 0;for(int i = l;i <= r;i ++)//其实不判奇偶性相异也行,反正算出来也是0{cnt = (i - l + 1) * (r - i + 1) % 2;if(cnt) ans ^= a[i];//奇偶性相等}cout << ans << '\n';}}12 行未改动const int N = 100000005;int n,k,cur,ans,cty[N];struct node {int c,t;}person;queue<node>persons;signed main() {int n;cin >> n;19 行未改动}cout << ans << '\n';}return 0;}```# T750439 中位数## Description46 行未改动32 行未改动3334353637383940414243444546474812 行未改动61626364656667686919 行未改动89909192939495969746 行未改动32 行未改动while(q --){int op,l,r;cin >> op >> l >> r;if(op == 1) a[l] = r;//操作1else{int cnt,ans = 0;for(int i = l;i <= r;i ++)//其实不判奇偶性相异也行,反正算出来也是0{cnt = (i - l + 1) * (r - i + 1) % 2;if(cnt) ans ^= a[i];//奇偶性相等}cout << ans << '\n';}}12 行未改动const int N = 100000005;int n,k,cur,ans,cty[N];struct node {int c,t;}person;queue<node>persons;signed main() {int n;cin >> n;19 行未改动}cout << ans << '\n';}return 0;}```# T750439 中位数## Description46 行未改动