cf/mirror

Pattern Matching

CF
1476E2300· international master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
5 3 4
_b_d
__b_
aaaa
ab__
_bcd
abcd 4
abba 2
dbcd 5
Output
YES
3 2 4 5 1
Sample 2of 3
Input
1 1 3
__c
cba 1
Output
NO
Sample 3of 3
Input
2 2 2
a_
_b
ab 1
ab 2
Output
NO
1476E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…