hdu 5244 inverse(分治¥)
inverse
Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 193 Accepted Submission(s): 97
The array is encrypted as follows.
Let ai(0≤i<n) be the i-th number of this original array.
Let bi(0≤i<n) be the i-th number of this encrypted array.
Let n be a power of 2, which means n=2k.
The bi is calculated as following.
f(x) means, if the number of 1 in the binary of x is even, it will return 1, otherwise 0.
Mike want to inverse the procedure of encryption.
Please help him recover the array a with the array b.
For each test case, the first line contains an integer k(0≤k≤20),
The next line contains n=2k integers, which are bi respectively.
It is guaranteed that, ai is an integer and 0≤ai≤109.
0
233
2
5 3 4 10
Case #2: 1 2 3 4
最新文章
- DOM0编程与基础方法
- TODO:小程序手机预览调试
- session过期时间
- PAT 1005. 继续(3n+1)猜想 (25) JAVA
- GridView合并表头、多重表头(转)
- github生成燃尽图
- 如何在VS2013中新建WindowsService定时任务
- C#处理Json文件
- python 函数的参数对应
- hdoj 1285 确定比赛名次【拓扑排序】
- cocos2d-x 找不到资源文件问题
- Nodejs进阶:核心模块Buffer常用API使用总结
- hdu5673 Robot 卡特兰数 / 默慈金数
- python学习笔记 函数
- Tinyhttpd for Windows
- Android studio 2 版本升级 Android studio 3 版本注意事项
- 原生js显示消失
- (8)socketserver并发
- 关于PHP批量图片格式转换的问题--本文转成webp, 其他过程格式一样
- python虚拟环境搭建