Hello!
There is no mention about visiting the same city twice in problem statement. However, reference solution checks for it with never_traveled_to() function. So I can imagine test, which doesn't conradict rules, but reference solution fails on it. Here it is:
3 cities: A, B, C. Start from A, goal is C. (no need to go back)
Available flights:
A -> B, begin: hour 0, land: hour 3, cost $1
B -> C, begin: hour 3, land: hour 4, cost $1000
B -> A, begin: hour 3, land: hour 6, cost $1
A -> B, begin: hour 6, land: hour 10, cost $1
B -> C, begin: hour 10, land: hour 11, cost $1
dep_time_min = 0, dep_time_max = 12
So optimal path is A-B-A-B-C with cost $4, but reference solution will find path A-B-C with cost $1002, since we can't wait for cheap flight more than 4 hours.
Can I get some clarifications about it?

