前言
太菜了 传送门:https://ac.nowcoder.com/acm/contest/11179/A
思路- 每个数的二进制表示唯一
- 对于一个数 它可以拆分成 2^(i)+2(i-1)+…+2(1)… 》也就是他的二进制表示
- 所以我们只需要找到是否可以填满即可
#include
using namespace std;
typedef unsigned long long LL;
const int N =70;
bool st[N];
signed main(void)
{
LL n,k,s;
cin>>n>>k>>s;
for(int i=0;i>a;
a--;
st[a]=1;
}
LL res=0;
for(int i=1;i>i)&1)
{
if(st[i])
{
cout
关注
打赏