시간 제한 | 메모리 제한 | 제출 | 정답 | 맞은 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 128 MB | 7 | 1 | 1 | 100.000% |
The pattern P and the text T are given. They contain the letters of the Latin alphabet (lowercase and uppercase). The pattern may also contain the characters '?', '[', ']', '{' and '}' You must find all the positions where P appears in T.
Each position in the pattern P may contain:
For example, if the pattern P is A?[bcCc]{De}, then the first letter of a match must be A, the second can be any Latin letter, the third - letter b, c or C, and the fourth can be any Latin letter except D or e.
The first line contains the number of test cases n. Each test consists of two lines. The first line contains the pattern P with no more than 100 characters and 60 positions. The second line contains the text with no more than 106 letters.
For each test case print on a separate line all text positions where the pattern matches, in ascending order (the first letter from the text T is assumed to have the position ‘1’). If the pattern P does not appear in text T, print the message "no match". There must be a single space between each printed position, and no extra space at the beginning/end of line.
3 A?[bcCc]{De} yAqCpsApbeAocqq ???[QWERTY] aSdFrQererRTY {eRT}? eRTeRTq
2 11 3 8 9 10 no match
ICPC > Regionals > Europe > Southeastern European Regional Contest > SEERC 2011 C번