CCC-Editorial

learn to google. see resources. get used to use/understand others code as it helps in job as well.

1 Like

btw now we have one more competitor in div1.

well sometimes it is tough to make test cases. You will understand when you start setting and testing (correct me here if you already do that ) . IMO testing is very boring hence testing >>> setting >>> solving problem.
If setter is not very good then testing is headache.
If setter is good then it is sometimes a real headache (for him) to make test cases.
Also main motive of any problem ( given that contest is meant for learning for beginners i.e. long challenge) should be allowing little unoptimized correct solutions to pass ( for beginners) rather than giving TLE to non intended solution.
Also that doesnā€™t mean I am supporting anyone. That is reality. Only they know how much they have done for this problem.

1 Like

Aha, I donā€™t understand.

which part you canā€™t understand XD ??

kaun rok rha hai ?? XD

Iā€™m really thrilled to be competing with you.

1 Like

Accha huaā€¦Ab div-2 waalo() par zulm nhi hogaā€¦xDā€¦

2 Likes

:smile: \hspace{0mm} \hspace{0mm}

:smile: \hspace{0mm} \hspace{0mm} (now its not similar @discuss)

1 Like

I m just appreciating her knowledgeā€¦ My 1st dp problem infactā€¦ :sweat_smile:
maza or rona saath me aaya isse krkeā€¦:joy::rofl::sweat_smile:

Maine toh ye same question kiya tha ek mahine pehle :joy::joy::joy: isliye dard nhi hua. Bas I hope agle contests mai kuch bhi puche but CCC jaisa question naa pucheā€‹:sweat_smile:

bs tree graph na pucheā€¦ 6 star fir to bn hi jaunga is saalā€¦:rofl::rofl:
warna bahut mushkil hā€¦ sayad impossible h mere liyeā€¦:joy:

1 Like

Bro can u tell me what is the actual , meaning of your
dp[1][j] tellsā€¦
this one
for(j = n - 1; j >= 0; jā€“) {
dp[1][j] = a[j] * (n - j); //whatā€™s that meanā€¦
}

dp[1][j] means the cost to hit one coconut in the subarray :- [j,n-1].

and why it multiplied by n-j
please explain with ex:
let array be 8 9 19
dp = 24 18 19 but whats that mean i still confused. please explain.

Now, when everything is calculated till j=0ā€¦answer is min(dp[1][0],dp[1][1],ā€¦dp[1][n-1]). Take care :slight_smile:

ha wo mene dekha par why it multiplied by n-j

Try to solve the question. You will realize why it is done like that.