ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1780. Gray Code

WA in 54
Posted by olimpo 11 Nov 2010 09:06
Any idea?
Re: WA in 54
Posted by happywu 13 Aug 2015 15:08
I got Wa in 54,either
have you figure out that.




Edited by author 13.08.2015 15:09
Re: WA in 54
Posted by happywu 13 Aug 2015 15:34
I found the problem .
I do this using DP,dp[i][0] dp[i][j] represent the ways to put '0' and '1'
and the answer to too big for long long .
So for this problem (only ask for ok or not ok)just set a max range ,when dp[i][j]>max just let dp[i][j]=max.
Hope help.