The word search puzzle below contains a secret message. To get this message, you have to find all the clue words in the puzzle (the words shown beside it) and circle them. Then you read any un-circled letters that remain from top left to bottom right to get the secret message. The clue words might appear horizontally, vertically, or diagonally. They might read forwards, backwards, downwards or upwards. Clue words can share any number of letters. Each clue word appears exactly once in the puzzle.

ADDICTIVE | DARK | PUDDING |
BAKING | DECADENT | SEMISWEET |
BARS | DELICIOUS | SUGAR |
BITTERSWEET | DESSERT | SWISS |
BROWNIES | DRINKS | SYRUP |
CAKES | FILLING | TREAT |
CANDY | FONDUE | TRUFFLES |
CHIPS | FOOD | UNSWEETENED |
CHOCOLATIERS | FUDGE | WHITE |
COCOA | ICE CREAM | |
CONFECTIONERY | ICING | |
COOKIES | INGREDIENT | |
CREAM PIE | MILK | |
CUPCAKE | MOUSSE |
In this case, the secret message is "CHOCOLATE ORIGINATES FROM THE SEEDS OF THE THEOBROAMA CACAO TREE". The locations of the words in the puzzle are shown below.
The input will contain
Each test case starts with a line containing two integers
The next line contains an integer
Note that the sample input below contains only a single test case, but the real data files will contain
Word Search puzzles courtesy of |
Livewire Puzzles (https://www.puzzles.ca) |
Sample Input
17 17
KLIMTSEINWORBCHOC
CGOLYNASEMISWEETT
EHNCSDENETEEWSNUO
RCIIOENIIGFILLING
SIOPKCLADNABFTESE
KFRNSAOFCEIOOMCTV
NRHEFDBAFTRSOEHEI
ICATAERTTUIGDDOGT
RORDSNCECCRONSCNC
DOWEFTRTEUTTUIOII
GKHTASPCIRPOHFLDD
NIIEWMRUEOICOTADD
IETESEPSRCNNAHTUA
CSESAESIIYDEBKIPO
ITIMBERLEUSAROEAM
AWFUDGECEARCAYRSO
SUGARDTESSUOMRSEE
37
ADDICTIVE
BAKING
BARS
BITTERSWEET
BROWNIES
CAKES
CANDY
CHIPS
CHOCOLATIERS
COCOA
CONFECTIONERY
COOKIES
CREAM PIE
CUPCAKE
DARK
DECADENT
DELICIOUS
DESSERT
DRINKS
FILLING
FONDUE
FOOD
FUDGE
ICE CREAM
ICING
INGREDIENT
MILK
MOUSSE
PUDDING
SEMISWEET
SUGAR
SWISS
SYRUP
TREAT
TRUFFLES
UNSWEETENED
WHITE
Sample Output
CHOCOLATEORIGINATESFROMTHESEEDSOFTHETHEOBROAMACACAOTREE
Locations of the Words (Shown for Reference Only)
Educational Computing Organization of Ontario - statements, test data and other materials can be found at ecoocs.org
Comments
What does RTE(✗✗✗✗✗) error mean?
RTE means Run Time Error, meaning that your code has an issue that forced it to stop. You can read more about it here: https://dmoj.ca/about/codes/.
The X's show how you did on each test case. You get an X for a wrong answer, and an O or a check mark for a correct one.