Three girls went on a vacation, each wearing a red "Love to travel" T-shirt. They each have brought 9 other clean tops, but are fairly active, and as a result each top becomes dirty after wearing it for a day,
They wanted to wear a clean top each day, so fortunately, their cabin came with a washer and drier, however, they could only wash two girls' clothes at a time, so the first and third girls had to wait until the next day to wash their clothes once each.
Their vacation lasted 3 weeks (including the day they left), so each girl washes her clothes twice while on vacation.
Here is a list of when they wore what. (Note they wore only one top per day.)
First girl:
- Red "Love to travel" T-shirt
- Floral tank top
- Green camisole
- White "I *heart* levik" T-shirt
- Gray short-sleeve shirt
- Blue long-sleeve shirt
- Pink poodle T-shirt
- Orange tank top
- Green camisole
- Yellow "Sled Shiver Sally" T-shirt
- Floral tank top
- Gray short-sleeve shirt
- Black "Night Owl" T-shirt
- Pink poodle T-shirt
- Red "Love to travel" T-shirt
- Yellow "Sled Shiver Sally" T-shirt
- Blue long-sleeve shirt
- Orange tank top
- Floral tank top
- Green camisole
- "I *heart* levik" T-shirt
Second girl:
- Red "Love to travel" T-shirt
- Floral short-sleeve shirt
- Orange tank top
- Green cougar T-shirt
- Gray long-sleeve shirt
- White "Mind your Pids and Queues" T-shirt
- Yellow sunshine shirt
- Black "Dark as Night" T-shirt
- Green cougar T-shirt
- Orange tank top
- Red "Love to travel" T-shirt
- Gray long-sleeve shirt
- Pink tank top
- Floral short-sleeve shirt
- White "Mind your Pids and Queues" T-shirt
- Blue tank top
- Yellow sunshine shirt
- Orange tank top
- Floral short-sleeve shirt
- White "Mind your Pids and Queues" T-shirt
- Red "Love to travel" T-shirt
Third girl:
- Red "Love to travel" T-shirt
- Floral long-sleeve shirt
- Gray "Undecision" T-shirt
- Pink "Pretty in Pink" T-shirt
- Blue coy toy T-shirt
- Orange short-sleeve shirt
- Yellow tank top
- Floral long-sleeve shirt
- Blue coy toy T-shirt
- White "Welcome to Truth Town" T-shirt
- Yellow tank top
- Black "Fun at Night" T-shirt
- Pink "Pretty in Pink" T-shirt
- Orange short-sleeve shirt
- Green long-sleeve shirt
- Gray "Undecision" T-shirt
- Blue coy toy T-shirt
- Floral long-sleeve shirt
- Yellow tank top
- Black "Fun at Night" T-shirt
- Red "Love to travel" T-shirt
From this information, what day did each girl wash her clothes?
Notes: Each girl washes her current top when she washes her other dirty clothes, so it is clean for following days. Differences between lights/darks or types of tops do not matter in the washing process.
I initially misunderstood this to mean there were 3 washing days, and one of the girls in each instance had to wait until the next washing day, rather than the next calendar day.
Now that I see what is meant, the below chart lists the four dates, followed by a colon and the girl(s) washing on that day:
7 : 2 3 8 : 1 14 : 1 3 15 : 2
7 : 1 3 8 : 2 14 : 1 3 15 : 2
7 : 2 3 8 : 1 15 : 1 3 16 : 2
7 : 2 3 8 : 1 15 : 1 2 16 : 3
7 : 1 3 8 : 2 15 : 1 3 16 : 2
7 : 1 3 8 : 2 15 : 1 2 16 : 3
The washing is understood to be in the evening, after wearing that day's top.
DIM top$(3, 21), dt(2)
CLS
OPEN "cleantop.txt" FOR INPUT AS #1
DO
LINE INPUT #1, l$
l$ = LTRIM$(RTRIM$(l$))
IF l$ > "" THEN
IF INSTR(l$, "girl:") THEN
g = g + 1
n = 0
DO: a$ = INKEY$: LOOP UNTIL a$ > ""
ELSE
n = n + 1
top$(g, n) = l$
PRINT n; l$; TAB(50);
FOR i = 1 TO n - 1
IF top$(g, i) = l$ THEN PRINT i;
NEXT
PRINT
END IF
END IF
LOOP UNTIL EOF(1)
CLOSE
FOR i = 2 TO 3
FOR j = 1 TO i - 1
FOR k = 1 TO 21
FOR l = 1 TO 21
IF top$(i, k) = top$(j, l) THEN
PRINT i; k, j; l, top$(j, l)
END IF
NEXT
NEXT
NEXT
NEXT
FOR d1 = 1 TO 18
FOR d2 = d1 + 1 TO 19
FOR excl1 = 1 TO 3
FOR excl2 = 1 TO 3
FOR g = 1 TO 3
d = 1
IF g <> excl1 THEN dt(d) = d1: ELSE dt(d) = d1 + 1
d = d + 1
IF g <> excl2 THEN dt(d) = d2: ELSE dt(d) = d2 + 1
d = d + 1
good = 1
FOR i = 1 TO dt(1) - 1
FOR j = i + 1 TO dt(1)
IF top$(g, i) = top$(g, j) THEN good = 0: GOTO notThis
NEXT
NEXT
FOR i = dt(1) + 1 TO dt(2) - 1
FOR j = i + 1 TO dt(2)
IF top$(g, i) = top$(g, j) THEN good = 0: GOTO notThis
NEXT
NEXT
FOR i = dt(2) + 1 TO 20
FOR j = i + 1 TO 21
IF top$(g, i) = top$(g, j) THEN good = 0: GOTO notThis
NEXT
NEXT
NEXT
IF good THEN
PRINT d1; ":";
FOR g = 1 TO 3
IF g <> excl1 THEN PRINT g;
NEXT
PRINT TAB(15);
PRINT d1 + 1; ":"; excl1; TAB(30);
PRINT d2; ":";
FOR g = 1 TO 3
IF g <> excl2 THEN PRINT g;
NEXT
PRINT TAB(45);
PRINT d2 + 1; ":"; excl2
END IF
ct = ct + 1
notThis:
NEXT
NEXT
NEXT
NEXT
PRINT ct
The "cleantop.txt" file contains the list, with "I *heart* levik" T-shirt" amended to add "White" in front, to result in an equal comparison with the first occurence for girl 1.
|
Posted by Charlie
on 2006-09-12 00:02:45 |