#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const int MAX = 100000; int main() { int n; cin >> n; vector > v(MAX); for(int i=0; i> a; v[a-1].push_back(i); } bitset<200000> x; for(int i=0; i> b; x[i] = (b != 0); } bitset<200000> ans; for(int i=0; i bs; for(unsigned j=0; j