prelude_to_doublets
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| prelude_to_doublets [2011/09/05 11:25] – created jtkorb | prelude_to_doublets [2011/09/06 13:00] (current) – jtkorb | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| ===== Input ===== | ===== Input ===== | ||
| - | Like Doublets, the input consists of a dictionary of words, one per line, followed by pairs of words, one per line. The dictionary and word pairs are separated by a blank line and there is a blank line after the last pair of words. | + | Like Doublets, the input consists of a dictionary of words, one per line, followed by pairs of words, one per line. The dictionary and word pairs are separated by an empty line. |
| ===== Output ===== | ===== Output ===== | ||
| - | For each line of input, print "set" if the integers form a complete set from smallest to largest without duplicates; otherwise print "not a set". | + | Print the number of words in the dictionary, in the format below. |
| + | |||
| + | NEXT TIME: The number of words in the dictionary should be the number of *unique* words. | ||
| ===== Sample Input ===== | ===== Sample Input ===== | ||
| Line 24: | Line 26: | ||
| booster roasted | booster roasted | ||
| coastal postal | coastal postal | ||
| + | rooster fooster | ||
| </ | </ | ||
| Line 30: | Line 32: | ||
| < | < | ||
| + | Dictionary size: 7 words | ||
| + | yes yes | ||
| + | |||
| + | yes yes | ||
| + | |||
| + | yes no | ||
| </ | </ | ||
prelude_to_doublets.1315247155.txt.gz · Last modified: 2011/09/05 11:25 by jtkorb