当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3733:Decrypt

题目描述
Licstar has a tool which can encrypt any text file by simple XOR encryption. The main procedure for this tool is as below.

for(int i = 0; i < contentLength; i += keyLength) {
        for(int j = 0; j < keyLength && i + j < contentLength; j++) {
                fprintf(f, "%.2x", content[i + j] ^ key[j]);
        }
}

One day, Doraemonok found the tool and encrypt a source code "source.cpp" by it. If you submit original "source.cpp" you can get Accepted,
but unfortunately, you only have the encypted "source.cpp" and you do not know the key. The length of key is no more than 30.

The encrypted "source.cpp" in hex is as below.

71060c02241a11224f52144754595f6a1d515d08003b521733060c49614f0e4d4f4e4713595e44641b4f6a415f7f4970724f42412e0007
674707094710591079555f6c41076f4e5a3c54420863445c671464471310101064554f310e1c6f5a133c1b420b68525577544e0d130c1
05e7f55057c4a476f0970724f4241684f55674f4e4713565f42645d0639154e245247725f5941234f4967015547581b1b19640e6577414
e6f525a724f4241684f55674f4e5c3910101064554f77414e6f525a2f654241684f55674f4e1a3910101064086577414e6f5d55060707412
b0011224f0c02555f4255641c1c77141d2a1e1f211c4e412701193e4f08084110595e27070a36120721155a26070741240a1b201b06475
c5610442c1c1c7702012b1754584f4241681f00331c4645635c555137104f24140c221b0e7202074d681b1d22014e1e5c4510472d19037
7060b3b523b114f584c614d5c7c654e47131040453006477535062a5211371642083b4f27280d0f2f5c45775f2a125c67515e0b0715050e
0c2e3a15576e5464471310101f6b210732410f3a06123d1d1141270955330707141340425f26190a3a41546f1e13311c16003a4f14290b
4e035c425155291a01380a646f525a721d07153d1d1b675f556d4e3a3a
输出解释
Please submit the original "source.cpp"
来自杭电HDUOJ的附加信息
Author doraemonok & licstar
Recommend notonlysuccess

该题目是Virtual Judge题目,来自 杭电HDUOJ

题目来源 ACMDIY第二届群赛

源链接: HDU-3733

最后修改于 2020-10-25T23:06:30+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)