can you please give the array at each step
8 3 10 20 6
[11, 10, 20, 6]
[10, 20, 17]
[27, 20]
[47]
102
here’s the array by the algorithm i followed
I’ve used the same approach, can you spot the mistake in my code?
https://www.codechef.com/viewsolution/25335866
It passes 1st, 2nd and 4th TC.
@anonymous1918
8 3 10 20 6
[14 3 10 20] -> 14
[ 14 13 20 ] -> 14 + 13
[27 20] -> 14 + 13 + 27
[47] -> 14 + 13 + 27 + 47 =>101
well I used modulo as well 
simply because he declared it globally
You have a nice knowledge of algos. Good !
she herself said she was an icpc silver medalist bro.
Thanks great. I will learn more and more when people like her be active on discuss.
Konsa waala silver? Regionals yaa world finals? Apne yahaa India mai kuch gold/silver nhi milta for regionals😅
Why don’t you go there (where loopfree is) XD?
you should learn balloon popping problem. This question is very similar to that problem. Here is the link : - LeetCode
why modulus is so time consuming
I used the greedy approach that you stated will pass the Subtask #2 (with distinct powers of 2).
Can you tell me why this greedy approach gave WA for other Subtasks? For which test case my greedy approach will give WA?
Thanks in advance.
I know it only because of experience btw you can refer here - https://stackoverflow.com/questions/27977834/why-is-modulus-operator-slow
Bade hi experienced ho aap toh 
Bs apse kuch 5-10%. Dot dot dot
might be because of integer overflow, try having long dp[][]
Where can we find material to read about Garsia Wachs algortihms?
What does “Linear Case” mean??