版本比较
啊!交互
正文
增加 5 行删除 5 行
42 行未改动4344454647484950517 行未改动59606162636465666768697052 行未改动12312412512612712812942 行未改动于是我们只能接受讨厌的 ```ask_and(0,2)``` 了。其实答案应该有很多,蒟蒻选择了其中一种,对应形式如下:| 三个数分别的情况 | ```ask_xor(0,1)```| ```ask_xor(1,2)``` | ```ask_and(0,1)```| ```ask_and(0,2)```||:---:|:---:|:---:|:---:|:---:||000|0|0|0|0||001|0|1|0|0||010|1|1|0|0|7 行未改动# Code码风巨丑,不喜轻喷。```cpp#include <iostream>#include <vector>#include<bits/stdc++.h>const int N=1e5+5;std :: vector<int> sanyueyu(int n);long long ask_and(int l, int r);long long ask_xor(int l, int r);52 行未改动for(int i=3;i<n;i++){ans[i]=ans[i-1]^ask_xor(i-1,i);}return ans;}```42 行未改动4344454647484950517 行未改动59606162636465666768697052 行未改动12312412512612712812942 行未改动于是我们只能接受讨厌的 ```ask_and(0,2)``` 了。其实答案应该有很多,蒟蒻选择了其中一种,对应形式如下:| 三个数分别的情况 | ```ask_xor(0,1)```| ```ask_xor(1,2)``` | ```ask_and(0,1)```| ```ask_and(0,2)```||:---:|:---:|:---:|:---:|:---:||000|0|0|0|0||001|0|1|0|0||010|1|1|0|0|7 行未改动# Code码风巨丑,不喜轻喷。```cpp#include <iostream>#include <vector>#include<bits/stdc++.h>const int N=1e5+5;std :: vector<int> sanyueyu(int n);long long ask_and(int l, int r);long long ask_xor(int l, int r);52 行未改动for(int i=3;i<n;i++){ans[i]=ans[i-1]^ask_xor(i-1,i);}return ans;}```