# When to give up on a hard math problem?

I practice olympiad problems from books like Putnam and Beyond. Often I come across a problem that I simply can’t solve. After $\sim30$ minutes of deep thinking it feels like I’m ramming my head into a brick wall, since I’ve exhausted all avenues of thought I am aware of. What should I do in these situations? Move on to another problem? Give up and see the answer? Or spend more time on it?