These 10 words have had their beginnings and endings removed. The same two letters can be found at the beginning and the end of each word.
(For example REspiRE.)
..YLI..
..GIB..
..SUL..
..LIV..
..QUI..
..IFI..
..RMI..
..ALG..
..GRA..
..STO..
Each of the 10 words might use a different pair of letters. Can you determine all 10 words?
YLI = STYLIST
GIB = LEGIBLE
SUL = INSULIN
LIV = ENLIVEN
= SALIVAS (gross !)
QUI = REQUIRE
= LAQUILA (Italian city)
IFI = DEIFIED
= EDIFIED
= REIFIER (an esoteric programming term)
RMI = TERMITE
ALG = AMALGAM
GRA = DEGRADE
= INGRAIN
STO = RESTORE
= ENSTONE (English city)
= MESTOME (term in botany)
The following program found these words in my 354,508 word dataset in ZERO elapsed time. (Let's see you improve on that, God of Flooble...)
Imports System
Imports System.IO
Imports System.Text
Imports System.Runtime.InteropServices
Imports System.Math
Module Module1
Sub Main()
Randomize()
Dim strstarttime As String
Dim strend As String
strstarttime = TimeOfDay
findwords()
Console.WriteLine( _
strstarttime & ": Start of execution.")
Console.WriteLine( _
TimeOfDay & ": End of execution.")
strend = "?"
Console.WriteLine(" ")
While strend <> "x"
Console.WriteLine( _
"Please enter X to exit program.")
strend = LCase(Console.ReadLine())
End While
End Sub
Sub findwords()
Dim strword As String
Dim strprevword As String
Dim strwork(7) As String
Dim strmiddle As String
Dim objStreamReader As StreamReader
objStreamReader = _
New StreamReader("C:VB.WORD.MASTER")
strprevword = " "
While 100 > 0
strword = objStreamReader.ReadLine
strword = UCase(strword)
If strword <= " " Then
Exit While
End If
If strword <= strprevword Then
Console.WriteLine( _
strword & " <= " & strprevword)
strprevword = "??????"
Exit While
End If
strprevword = strword
If Len(strword) = 7 Then
For index1 As Integer = 1 To Len(strword)
strwork(index1 - 1) = Mid(strword, index1, 1)
Next
strmiddle = strwork(2) & strwork(3) & strwork(4)
If strmiddle = "YLI" Or _
strmiddle = "GIB" Or _
strmiddle = "SUL" Or _
strmiddle = "LIV" Or _
strmiddle = "QUI" Or _
strmiddle = "IFI" Or _
strmiddle = "RMI" Or _
strmiddle = "ALG" Or _
strmiddle = "GRA" Or _
strmiddle = "STO" Then
If (strwork(0) = strwork(5) And _
strwork(1) = strwork(6)) Or _
(strwork(0) = strwork(6) And _
strwork(1) = strwork(5)) Then
Console.WriteLine(strword)
End If
End If
End If
End While
objStreamReader.Close()
If strprevword = "??????" Then
For index1 As Integer = 0 To 9
Console.WriteLine("ERROR !!!!!")
Next
Console.WriteLine( _
"Wordlist master file is not in ascending sequence.")
Console.ReadLine()
End
End If
End Sub
End Module
Edited on September 28, 2004, 10:38 am
|
Posted by Penny
on 2004-09-28 10:35:16 |