Solved by 165 users: ...
Two regular expressions
Time limit = 2
You are given two regular expressions R1
and should find minimal string S
String consists of capital latin letters A..Z
. Regular expression is
word consisting of A..Z
and * ?
The symbol *
corresponds to any word or empty word.
The symbol ?
corresponds to one letter.
Two lines with regular expressions R1 and R2, each line has less than 500 characters.
String S one of the strings with minimal length matching both regular expressions.
If string matching R1 and R2 does not exist, then output #.
From the book "National features of programming problems"
29 September 2003
<PREV | Problem set | Search related messages | NEXT>