Statistics for Constrained Shortest Paths in Terrains and Graphs