propagation implemented - wrong result
valgrind and callgrind in Makefile
a different scheme. works on test cases, but gives runtime error on judge