2017 Winter Waterloo Local ACM Contest, Problem B
Vera is learning about the longest common subsequence problem.
A string is a (possibly empty) sequence of lowercase letters. A subsequence of a string vra
, a
, (empty string), and
vera
are all subsequences of vera
. The longest common subsequence (LCS) of two strings vera
and eats
is ea
.
For homework, she was given two strings WRONGANSWER
.
Constraints
, are integers consists of lowercase letters
Input Specification
The input will be in the format:
Output Specification
Output one line consisting of the string WRONGANSWER
if no
Sample Input 1
4 2
vera
Sample Output 1
eats
Explanation of Sample Output 1
Another possible answer is uber
.
Sample Input 2
4 5
vera
Sample Output 2
WRONGANSWER
Comments
Since the original data were weak, an additional test case was added, and all submissions were rejudged.