| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 12199 | 電機系資料結構上機考 (Word Puzzle) |
|
Description
Given a word puzzle and some words, please identify the corordinates of the words in the puzzle.
For example, please find "cool", "cat", "vain", "soul" in the following puzzle.
Input
The first integer is the width and also the height of the word puzzle.
Then, the word puzzle is listed.
Then the second integer is the number of words to find.
Then, the words to find are listed in one line.
Output
If a word is found in the puzzle, please report "Yes", then its starting position (row, col) and ending position (row, col), and then also print the word with vowels first and consonants afterward.
- For example, "cool" appears in the puzzle from 1,0 to 4,0, "cat" appears in the puzzle from 0,2 to 0,4, "vain" appears in the puzzle from 4,4 to 4,1.
- Please note that we only count vertical or horizontal words (no diagonal ones)
If a word is not in the puzzle, please report "No".