The 15 triplets listed below were created by dividing each
of 5 not-so-common 9-letter words - each into 3 parts:
QUA, SUN, UAC, LLE, QUA,
ALL, SQU, LOQ, ITY, ARE,
AQU, UNE, LED, VIA, DRI.
You are requested to
- reconstruct the original words
- provide a short comment on each
- discover one common feature, present in all five.
Have fun!
quadrille
quadrivia
quadrille
quadrivia
loquacity
aquarelle
unequaled
unequaled
duplicates coming from duplication of QUA.
DefDbl A-Z
Dim crlf$, wordPart$(15)
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For i = 1 To 15
wordPart(i) = Mid("quasunuacllequaallsquloqityareaquuneledviadri", 3 * i - 2, 3)
Next i
For a = 1 To 15
For b = 1 To 15
If b <> a Then
For c = 1 To 15
If c <> a And c <> b Then
w$ = wordPart(a) + wordPart(b) + wordPart(c)
If isWord(w) Then
Text1.Text = Text1.Text & w & crlf
End If
End If
Next c
End If
Next b
Next a
Text1.Text = Text1.Text & crlf & " done"
End Sub
Function isWord(w$)
n = Len(w$)
w1$ = Space$(n)
Open "\words\words" + LTrim$(Str$(n)) + ".txt" For Binary As #2
l = LOF(2) / n
low = 1: high = l
Do
middle = Int((low + high) / 2)
Get #2, (middle - 1) * n + 1, w1$
If w1$ = w$ Then isWord = 1: Close 2: Exit Function
If w1$ < w$ Then low = middle + 1 Else high = middle - 1
Loop Until low > high
isWord = 0
Close 2
End Function
|
Posted by Charlie
on 2017-09-22 12:17:16 |