idiom
have a brainwave
突然有了一个聪明的想法
Meaning
to suddenly have a clever idea
Example
I **had a brainwave** and solved the puzzle.
我突然有了一个聪明的想法,并解开了这个谜题。