249 - Bang the Drum Slowly
Moderator: Board moderators
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
249 - Bang the Drum Slowly
Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!
-
- Experienced poster
- Posts: 139
- Joined: Wed May 18, 2011 3:04 pm
Re: 249 - Bang the Drum Slowly
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!
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: http://uhunt.onlinejudge.org/id/95895
My solutions for UVa problems: https://github.com/metaphysis/Code.
My solutions for UVa problems: https://github.com/metaphysis/Code.
-
- Experienced poster
- Posts: 139
- Joined: Wed May 18, 2011 3:04 pm
Re: 249 - Bang the Drum Slowly
I used memoization to store results and got AC. Thank you, spencereir!
metaphysis: http://uhunt.onlinejudge.org/id/95895
My solutions for UVa problems: https://github.com/metaphysis/Code.
My solutions for UVa problems: https://github.com/metaphysis/Code.