首页  >  文章  >  数据库  >  Codeforces div.2 B. The Child and Set

Codeforces div.2 B. The Child and Set

WBOY
WBOY原创
2016-06-07 15:18:221371浏览

At the children's day, the child came to Picks's house, and messed his house up. Picks was angry at him. A lot of important things were lost, in particular the favorite set of Picks. Fortunately, Picks remembers something about his set S :

At the children's day, the child came to Picks's house, and messed his house up. Picks was angry at him. A lot of important things were lost, in particular the favorite set of Picks.

Fortunately, Picks remembers something about his set S:

  • its elements were distinct integers from 1 to limit;
  • the value of Codeforces div.2 B. The Child and Set was equal to sum; here lowbit(x) equals 2k where k is the position of the first one in the binary representation of x. For example, lowbit(100102)?=?102,?lowbit(100012)?=?12,?lowbit(100002)?=?100002 (binary representation).

Can you help Picks and find any set S, that satisfies all the above conditions?

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn