U648439 通信题配置测试

题目背景

[通信题配置指南](https://www.luogu.com.cn/article/84bz48ew) 如果 hack 成功了可以去 github 仓库提 issues。

题目描述

Alice 读入一个 $\le 10^9$ 的正整数,将其转换为长度不超过 $40$ 的 $\tt 01$ 字符串,Bob 接收到这个字符串,将其转换回原本的正整数。

输入格式

无

输出格式

无

说明/提示

参考实现: ```cpp #include std::string Alice(int target); int Bob(std::string message); std::string Alice(int target) { std::string bit_string = ""; for (int i = 0; i < 32; ++i) { if ((target >> i) & 1) { bit_string += "1"; } else { bit_string += "0"; } } return bit_string; } int Bob(std::string message) { int restored_value = 0; for (int i = 0; i < 32; ++i) { if (message[i] == '1') { restored_value |= (1