Athletic ability was admired by the Minikins, and the annual summer competition of athletic events was eagerly anticipated In one such competition, Ebum, Ekum, Elfum, Epum, Eskum, and Evum were among the competitors. Three of them were entered in each of four events, and each of the four events was won by a different one of the six.
Based on the statements below, which three entered each of the events and who were the four winners?
- The winner of the tree climb did not enter the distance run.
- Ekum entered the distance run and the tree climb.
- The only one of the four events that Evum did not enter was the log lift.
- The winner of the spear throw entered one other event.
- Eskum, who entered the distance run and one other event, and Elfum were both winners.
- Ebum won the only event that he entered.
- Epum competed in the tree climb and one other event, which was not the spear throw.
CLS
name$ = "bklpsv"
ebum = 1: ekum = 2: elfum = 3: epum = 4: eskum = 5: evum = 6
FOR tc1 = 1 TO 4
tc(1) = tc1
FOR tc2 = tc1 + 1 TO 5
tc(2) = tc2
FOR tc3 = tc2 + 1 TO 6
tc(3) = tc3
FOR tcw = 1 TO 3
tcw$ = MID$(name$, tc(tcw), 1)
tcros$ = MID$(name$, tc1, 1) + MID$(name$, tc2, 1) + MID$(name$, tc3, 1)
IF tcw$ <> "k" AND (tc1 = ekum OR tc2 = ekum OR tc3 = ekum) THEN
IF tcw$ <> "v" AND (tc1 = evum OR tc2 = evum OR tc3 = evum) THEN
dr(1) = ekum
dr(2) = eskum
dr(3) = evum
drros$ = "ksv"
FOR drw = 1 TO 3
drw$ = MID$(name$, dr(drw), 1)
FOR ll1 = 1 TO 3
ll(1) = ll1
FOR ll2 = ll1 + 1 TO 4
ll(2) = ll2
FOR ll3 = ll2 + 1 TO 5
ll(3) = ll3
llros$ = MID$(name$, ll1, 1) + MID$(name$, ll2, 1) + MID$(name$, ll3, 1)
FOR st1 = 1 TO 4
st(1) = st1
FOR st2 = st1 + 1 TO 5
st(2) = st2
st3 = evum
st(3) = st3
stros$ = MID$(name$, st1, 1) + MID$(name$, st2, 1) + MID$(name$, st3, 1)
FOR llw = 1 TO 3
llw$ = MID$(name$, ll(llw), 1)
FOR stw = 1 TO 3
stw$ = MID$(name$, st(stw), 1)
stct = 0
IF INSTR(tcros$, stw$) THEN stct = stct + 1
IF INSTR(drros$, stw$) THEN stct = stct + 1
IF INSTR(llros$, stw$) THEN stct = stct + 1
IF stct = 1 THEN
eskumct = 0
IF INSTR(tcros$, "s") THEN eskumct = eskumct + 1
IF INSTR(stros$, "s") THEN eskumct = eskumct + 1
IF INSTR(llros$, "s") THEN eskumct = eskumct + 1
IF eskumct = 1 AND (drw$ = "s" OR tcw$ = "s" OR llw$ = "s" OR stw$ = "s") THEN
IF drw$ = "l" OR llw$ = "l" OR stw$ = "l" OR tcw$ = "l" THEN
ebumct = 0
IF INSTR(tcros$, "b") THEN ebumct = ebumct + 1
IF INSTR(stros$, "b") THEN ebumct = ebumct + 1
IF INSTR(llros$, "b") THEN ebumct = ebumct + 1
IF INSTR(drros$, "b") THEN ebumct = ebumct + 1
IF ebumct = 1 THEN
IF tcw$ = "b" OR drw$ = "b" OR llw$ = "b" OR stw$ = "b" THEN
IF INSTR(tcros$, "p") > 0 THEN
IF INSTR(stros$, "p") = 0 THEN
IF INSTR(llros$, "p") > 0 AND INSTR(drros$, "p") = 0 OR INSTR(llros$, "p") = 0 AND INSTR(drros$, "p") > 0 THEN
PRINT "TC:"; tcros$, tcw$
PRINT "DR:"; drros$, drw$
PRINT "ST:"; stros$, stw$
PRINT "LL:"; llros$, llw$
END IF
END IF
END IF
END IF
END IF
END IF
END IF
END IF
NEXT stw
NEXT llw
NEXT
NEXT
NEXT
NEXT
NEXT
NEXT
END IF
END IF
NEXT
NEXT
NEXT
NEXT
finds
TC:kpv p
DR:ksv s
ST:lsv l
LL:blp b
which is:
Tree climbing: Epum won from among Ekum, Epum and Evum.
Distance running: Eskum won from among Ekum, Eskum and Evum.
Spear throw: Elfum won from among Elfum, Eskum and Evum.
Log lift: Ebum won from among Ebum, Elfum and Epum.
|
Posted by Charlie
on 2013-07-08 19:38:17 |