I try to solve this problem
But i get WA.......
can any one help me????????
Code: Select all
CUT after acc..........................
Moderator: Board moderators
I try to solve this problem
But i get WA.......
can any one help me????????
Code: Select all
CUT after acc..........................
Code: Select all
6
0 1
1 0
5 1
1 5
7 2
2 7
Code: Select all
0
1
47
1
367
5
Thanks helloneo
now i can solve it........
![]()
![]()
![]()
![]()
![]()
I didn't solve this problem with DP.. Just try to find a pattern..f74956227 wrote:I think this problem can be solved by using DP, but i can't find the recursive relationship...![]()
could someone give me a hint?
Do not use floating point operationaliahmed wrote:Code: Select all
sum+=pow(2,q);
What does this mean ? Why isn't 0101011 (43) better than 0101101 (45) in case of 4 3 .The number of 1s adjacent to one or more 0 in the binary representation is maximized.
So, the answer would be 13 (1101)Find the smallest integer N ..