标签:ret bit info 链接 using mes col include inf
链接:https://ac.nowcoder.com/acm/problem/17193
1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N = 1000100; 4 bitset<N>s,p; 5 int main() { 6 int i,n,j,x,y; 7 cin>>n; 8 s[0]=1; 9 for(i=1;i<=n;i++) { 10 cin>>x>>y; 11 p.reset(); 12 for(j=x;j<=y;j++) { 13 p|=(s<<(j*j)); 14 } 15 s=p; 16 } 17 cout<<s.count()<<endl; 18 return 0; 19 }
标签:ret bit info 链接 using mes col include inf
原文地址:https://www.cnblogs.com/pangbi/p/14744153.html