bitset的基本应用了
类似可行性背包的dp考虑
复杂度O(nmL/64)
#include <bits/stdc++.h>
using namespace std; bitset <> bs,bs0; int n,a,b; int main(){
ios::sync_with_stdio(false);
cin>>n;
bs[]=;
for(int i=;i<=n;i++){
bs0=bs; bs.reset();
cin>>a>>b;
for(int j=a;j<=b;j++)
bs|=(bs0<<(j*j));
}
cout<<bs.count();
}