included <cstdio> in btchelper to fix issue with <algorithm>