User Tools

Site Tools


prelude_to_doublets

This is an old revision of the document!


Prelude to Doublets

First, start by reading the problem statement for Doublets. The input format is the same.

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 an empty line.

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”.

Sample Input

booster
rooster
roaster
coasted
roasted
coastal
postal

booster roasted
coastal postal

Sample Output

Dictionary size: 7 words
yes yes

yes yes

yes no
prelude_to_doublets.1315248561.txt.gz · Last modified: 2011/09/05 11:49 by jtkorb