00001 00002 #include "hdyn.h" 00003 00004 main() 00005 { 00006 hdyn *b = get_hdyn(cin); 00007 if (b == NULL) err_exit("Can't read input snapshot"); 00008 00009 while(1) { 00010 int i = 0; 00011 00012 for_all_daughters(hdyn, b, bi) 00013 putiq(bi->get_dyn_story(), "nb_check_counter", i++); 00014 00015 for_all_daughters(hdyn, b, bi) { 00016 if (find_qmatch(bi->get_dyn_story(), "nb_check_counter")) { 00017 i = getiq(bi->get_dyn_story(), "nb_check_counter"); 00018 rmq(bi->get_dyn_story(), "nb_check_counter"); 00019 } 00020 } 00021 } 00022 }