/*
 * This code is from "Algorithms in C, Third Edition,"
 * by Robert Sedgewick, Addison Wesley Longman, 1998.
 * (With small alterations)
 */
#include <stdio.h>
#include <stdlib.h>
#include "Item.h"
#include "ST.h"
int main(int argc, char *argv[])
 { int N; /* maxN = atoi(argv[1]); sw = atoi(argv[2]); */
    Key v; Item item;
    STinit();
    for (N = 0; ; N++)
      {
	//        if (sw) v = ITEMrand();
	//   else if (ITEMscan(&v) == EOF) break;
	if (ITEMscan(&v) == EOF) break;
        if (STsearch(v) != NULLitem) continue;
        key(item) = v;
        STinsert(item); 
      }
    STsort(ITEMshow); printf("\n");
    printf("%d keys, ", N);
    printf("%d distinct keys\n", STcount());
    return 0;
 }
