CF94A.Restoring Password

入门

通过率:0%

时间限制:2.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Igor K. always used to trust his favorite Kashpirovsky Antivirus. That is why he didn't hesitate to download the link one of his groupmates sent him via QIP Infinium. The link was said to contain "some real funny stuff about swine influenza". The antivirus had no objections and Igor K. run the flash application he had downloaded. Immediately his QIP Infinium said: "invalid login/password".

Igor K. entered the ISQ from his additional account and looked at the info of his main one. His name and surname changed to "H1N1" and "Infected" correspondingly, and the "Additional Information" field contained a strange-looking binary code 80 characters in length, consisting of zeroes and ones. "I've been hacked" — thought Igor K. and run the Internet Exploiter browser to quickly type his favourite search engine's address.

Soon he learned that it really was a virus that changed ISQ users' passwords. Fortunately, he soon found out that the binary code was actually the encrypted password where each group of 10 characters stood for one decimal digit. Accordingly, the original password consisted of 8 decimal digits.

Help Igor K. restore his ISQ account by the encrypted password and encryption specification.

伊戈尔·K. 一直非常信赖他最喜爱的卡什皮罗夫斯基杀毒软件。因此,当他的一个小组同学通过 QIP Infinium 给他发送了一个链接,并称其中包含“一些关于猪流感的真正搞笑内容”时,他毫不犹豫地下载了该链接。杀毒软件未提出任何警告,于是伊戈尔·K. 运行了他所下载的 Flash 应用程序。随即,他的 QIP Infinium 客户端显示:“登录名/密码无效”。

伊戈尔·K. 使用他的备用账户登录 ISQ 系统,查看其主账户的信息。他发现自己的姓名与姓氏分别被更改为“H1N1”和“Infected”,而“附加信息”字段中则包含一段长度为 80 位、由 0 和 1 组成的、外观奇特的二进制码。“我被黑了”——伊戈尔·K. 暗想,随即打开 Internet Exploiter 浏览器,迅速输入他最常使用的搜索引擎网址。

很快他了解到,这的确是一种病毒,专门篡改 ISQ 用户的密码。幸运的是,他很快发现这段二进制码实际上就是加密后的密码,其中每 10 位二进制字符对应一位十进制数字。因此,原始密码由 8 位十进制数字组成。

请根据加密后的密码及加密规则,帮助伊戈尔·K. 恢复他的 ISQ 账户。

输入格式

The input data contains 11 lines. The first line represents the binary code 80 characters in length. That is the code written in Igor K.'s ISQ account's info. Next 10 lines contain pairwise distinct binary codes 10 characters in length, corresponding to numbers 0, 1, ..., 9.

输入数据包含 11 行。第一行表示一个长度为 80 的二进制码,即 Igor K. 的 ISQ 账户信息中所写的编码。接下来的 10 行包含 10 个互不相同的、长度为 10 的二进制码,分别对应数字 0,1,…,90, 1, \dots, 9。

输出格式

Print one line containing 8 characters — The password to Igor K.'s ISQ account. It is guaranteed that the solution exists.

输出一行,包含 8 个字符——即 Igor K. 的 ISQ 账户密码。保证解存在。

输入输出样例

  • 输入#1

    01001100100101100000010110001001011001000101100110010110100001011010100101101100
    0100110000
    0100110010
    0101100000
    0101100010
    0101100100
    0101100110
    0101101000
    0101101010
    0101101100
    0101101110

    输出#1

    12345678
  • 输入#2

    10101101111001000010100100011010101101110010110111011000100011011110010110001000
    1001000010
    1101111001
    1001000110
    1010110111
    0010110111
    1101001101
    1011000001
    1110010101
    1011011000
    0110001000

    输出#2

    30234919

输入解题思路,AI测评打分。不知道怎么写?

首页