QOJ.ac

QOJ

حد الوقت: 1 s حد الذاكرة: 2048 MB مجموع النقاط: 100

#2370. 键盘

الإحصائيات

糟糕!Joanna 刚刚把糖浆洒在了键盘上,现在有些按键粘住了。这让她非常沮丧,因为每次她按下其中一个粘住的按键时,对应的字符都会在电脑上输入两次。

这发生得真不是时候;比赛刚刚开始,她正准备输入第一道题的题解!Joanna 没有时间拆开并清洁键盘上的每一个按键,所以她想知道是否有一种方法可以快速识别出哪些按键粘住了。她开始有些慌乱,于是快速在键盘上输入了一些文本,并盯着屏幕上显示的最终文本。

给定 Joanna 在键盘上输入的文本行以及屏幕上显示的最终文本,请帮助她确定哪些按键一定是粘住的。

输入格式

输入包含:

  • 一行包含字符串 $s$ ($1 \le \text{length}(s) \le 1\,000$),即 Joanna 在键盘上输入的文本。
  • 一行包含字符串 $t$ ($1 \le \text{length}(t) \le 1\,000$),即屏幕上显示的最终文本。

$s$ 和 $t$ 均仅由小写字母('a'-'z')和空格(' ')组成,且均以字母开头和结尾。

保证 $t$ 是将 $s$ 中对应粘住按键的每个字符加倍后的结果。至少有一个字符对应的按键是粘住的(即 $s \neq t$)。

输出格式

输出所有对应粘住按键的字符(字母和空格),顺序不限。

样例

输入格式 1

this is very annoying
thiss iss veery annoying

输出格式 1

se

输入格式 2

so sticky
ssoo ssttiicckkyy

输出格式 2

its yock

Waffle keyboard by The Keyboard Waffle Iron

Editorials

IDTypeStatusTitlePosted ByLast UpdatedActions
EditorialOpen Official EditorialQingyu- Download

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.