In each array below, each letter is paired with the letter directly above/below it (so each pair is listed twice per array).
1) For each array, the corresponding word will use exactly one letter from each pair. (So for the first array, the word contains "a", or "q" but not both).
2) If the word's unused letters are removed from the array's bottom row, the word will be spelled out using the remaining letters in the bottom row.
3) The letters c, l, and p will each appear in two words (and not at all in the remaining word).
4) Three of the letters d, g, h, s, u, and y will appear in one word, the other three will appear in another word, and none will appear in the remaining word.
What are the words associated with each array?
A B C D E F G H I J K L M N O P Q R S T U V
Q H V P K R O B U L E J N M G D A F T S I C
A B C D E F G H I J K L M N O P Q R S T U V W X
C G A J K M B I H D E X F T Q R O P W N V U S L
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
V W D C Z O Q S N P Y X R I F J G M H U T A B L K E
The program makes no use of the top row in each pair, but merely finds that the letters in the word appear in the correct order in the bottom row, and that the length of the word is half the number of letters in that string.
DATA qhvpkrobulejnmgdaftsic
DATA cgajkmbihdexftqropwnvusl
DATA vwdczoqsnpyxrifjgmhutablke
DO
READ s$
w$ = SPACE$(LEN(s$) / 2)
OPEN "\words\words" + LTRIM$(STR$(LEN(s$) / 2)) + ".txt" FOR BINARY AS #1
DO
REDIM used(26)
GET #1, , w$
IF EOF(1) THEN EXIT DO
ix = 0: good = 1
FOR i = 1 TO LEN(w$)
pix = ix
ix = INSTR(s$, MID$(w$, i, 1))
IF ix <= pix THEN good = 0: EXIT FOR
NEXT i
IF good THEN PRINT w$
LOOP UNTIL EOF(1)
CLOSE 1
PRINT
LOOP
The program ends unceremoniously with an "out of data" error after finding:
problematic
ambidextrous
copyrightable
|
Posted by Charlie
on 2012-04-16 13:33:48 |