PAT A1084 B1029 (甲级 乙级)

1084 Broken Keyboard (20)(20 分)

作者: CHEN, Yue

单位: PAT联盟

时间限制: 200ms

内存限制: 64MB

代码长度限制: 16KB

On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.

Now given a string that you are supposed to type, and the string that you actually type out, please list those keys which are for sure worn out.

Input Specification:

Each input file contains one test case. For each case, the 1st line contains the original string, and the 2nd line contains the typed-out string. Each string contains no more than 80 characters which are either English letters [A-Z] (case insensitive), digital numbers [0-9], or "_" (representing the space). It is guaranteed that both strings are non-empty.

Output Specification:

For each test case, print in one line the keys that are wo

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
题目描述中提到了一个问题:pat 1005乙级。根据引用的描述,每个测试用例包含两行输入,第一行是一个正整数K,第二行是K个互不相同的正整数n的值。根据引用,给出了一段C++代码,该代码解决了这个问题,其中涉及到了一个set_list函数和一个print_output函数。根据引用,还给出了另一段模拟C代码,也解决了这个问题,其中使用了vector和sort等STL库函数。根据这些引用内容,可以给出以下回答: 根据题目描述和代码内容,pat 1005乙级是一个关于卡拉兹猜想的问题。题目要求给定一个序列,对于序列中的每个数,按照卡拉兹猜想进行递推,并标记递推过程中被覆盖的数。最后,输出未被标记过的数。根据代码中的set_list函数和print_output函数,可以解决这个问题。其中set_list函数用于标记递推过程中被覆盖的数,print_output函数用于输出未被标记过的数。另外,根据引用给出的模拟C代码,还使用了vector和sort等STL库函数来简化代码实现。 因此,要解决pat 1005乙级的问题,可以参考上述提供的C++代码,使用set_list函数标记被覆盖的数,并使用print_output函数输出未被标记过的数。同时,可以考虑使用STL库函数来简化代码实现。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [PAT乙级1005](https://blog.csdn.net/lonely_daisy/article/details/119218256)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *3* [PAT乙级题解1005(超级详细分析,看完就懂)](https://blog.csdn.net/m0_58472103/article/details/126552607)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值