home *** CD-ROM | disk | FTP | other *** search
- #include <LEDA/p_dictionary.h>
- #include <LEDA/list.h>
-
- declare2(p_dictionary,int,string)
-
- declare(list,p_dictionary(int,string))
-
- main()
- {
- p_dictionary(int,string) D;
- p_dic_item it;
-
- int i,n = read_int("n = ");
-
- list(p_dictionary(int,string)) L;
-
- L.append(D);
-
- for(i = 1; i<n; i++) L.append(L.tail().insert(i,form(" -%d- ",i)));
-
-
- forall(D,L)
- { forall_items(it,D) cout << D.key(it) << D.inf(it) << " ";
- newline;
- }
-
-
- }
-