挺简单的组合把。
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define LL long long
int flag[];
int p[];
class LittleElephantAndIntervalsDiv1
{
public :
LL getNumber(int M, vector <int> L, vector <int> R)
{
LL ans = ;
int i,j;
for(i = ;i < L.size();i ++)
{
for(j = L[i];j <= R[i];j ++)
p[j] = i+;
}
for(i = ;i <= M;i ++)
{
if(p[i]&&!flag[p[i]])
{
flag[p[i]] = ;
ans *= ;
}
}
return ans;
}
};