We have a good explanation for single sets here:
but I wanted to know how this would work for an array of sets like below:
bool cmp(const pair <int, int> &a, const pair <int, int> &b) {
if (b.first < a.first)
return true;
return a < b;
}
set <pair <int, int>, decltype(&cmp)> block[SQ](&cmp);
I prefer method 3 but you can answer any method you like.