UVA10866 Magic Bitstrings

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1807 [PDF](https://uva.onlinejudge.org/external/108/p10866.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10866/45344e0bee4b7a00c159ab1ff41572371d4c9513.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10866/d6b46819eed559dadc9e0e161b536ab7ac8219ee.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10866/d493a745e10bdd0f1c11f5fe235faf01073415b4.png)