249 - Bang the Drum Slowly

All about problems in Volume 2. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

249 - Bang the Drum Slowly

Post by brianfry713 »

Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!
metaphysis
Experienced poster
Posts: 139
Joined: Wed May 18, 2011 3:04 pm

Re: 249 - Bang the Drum Slowly

Post by metaphysis »

Can anybody solved this problem?
It's seem to be a simple problem involving simulation and recursion, but I always got TLE, I double checked my code and couldn't figure out why, can anyone give me some critical test cases or hints? Thanks in advance!
metaphysis
Experienced poster
Posts: 139
Joined: Wed May 18, 2011 3:04 pm

Re: 249 - Bang the Drum Slowly

Post by metaphysis »

I used memoization to store results and got AC. Thank you, spencereir!
Post Reply

Return to “Volume 2 (200-299)”