Orange Boy Can You Solve It Out? Ep. 62

short 思考题

A^B Problem

Given two pattern strings A and B that consists of lower-case letters, ? (match a single character) and * (match one or more characters)

For example, abc?d*e matches abcfdppe and abcgde but not ae or abcdde.

Find a string that matches A but not B or output IMPOSSIBLE.

Example

A='abc???e'
B='abc*fe'

Out: abcggge

A='abc???e'
B='a*'
Out: IMPOSSIBLE

版权声明:
作者:XGN
链接:https://blog.hellholestudios.top/archives/1594
来源:Hell Hole Studios Blog
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>
文章目录
关闭
目 录