On the Power of Neural Networks for Solving Hard Problems