40分暴力

唐钧  •  2个月前


include<bits/stdc++.h>

using namespace std;

define ll long long

ll r0,ans=0; stacks;

void clear() {

while(!s.empty())
{
	if(s.top()==1)
	{
		r0++;
	}
	s.pop();
}
return;

}

void bin(ll a) {

ll sb=a;
while(sb>=1)
{
	s.push(sb%2);
	sb/=2;
}

}

int main() {

ll n,s,t;
cin>>n>>s>>t;
for(int i=s;i<=t;i++)
{
	r0=0;
	bin(i);
	clear();
	if(r0<=n)
	{
		ans++;
	}
}
cout<<ans;
return 0;

} 、、、


评论:

傻逼,乱做什么?卧槽。


IMUD  •  2个月前