See More

// Mo's Algorithm #include using namespace std; struct Query { int L, R; }; void printQuerySums(int a[], int n, Query q[], int m) { for (int i=0; i