#include //#include"atcoder/all" #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #define all(a) (a).begin(),(a).end() using namespace std; //using namespace atcoder; int main(){ int N,i,j;scanf("%d",&N); int Q[1<