compoundwords - bradendubois/competitive-programming GitHub Wiki
Compound Words
ID: compoundwords
Difficulty: 1.8
CPU Time: 1 second
Memory: 1024 MB
Solution
Read in every word into a list, and then (through two loops, or some other way) taking every pair a and b, check if a+b has not been found, and if not, add it to some list of compound words, then mark that it has been found; repeat with b+a. Then, sort that list and output every word.