Osmo
Word search is a very popular enigmatic game that consists of a table with letters arranged in N rows and N columns and a list of words we have to search for. To solve an instance of word search we, for each word from the list, find all appearances of that word in the table and cross out all the letters forming that particular appearance. The word can start anywhere and lay in any of the eight directions (up, down, left, right and the four diagonal directions).
Reading all non-crossed letters in row-major order (up to down and in each row from left to right) gives the solution of the word search puzzle. Write a program that will find the solution of the given puzzle.
2
ab
cd
1
ad
Output:
bc
5
patka
guska
macka
klopa
krava
4
patka
guska
macka
krava
Output:
klopa
4
rast
plso
tajv
pnez
6
rast
alan
nt
past
taj
bonus
Output:
povez
Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.