Comments
On touristHello 2018 -- Tutorial, 8 years ago
0

Can someone explain to me why we need to do ans = min(ans, sum + (L > 0) * c[i]); in problem C

I know u probably dont care since this contest is 2 months old but thanks for posting your dp solution. I had a tough time trying to come up with the dp solution, i got close tho :( Btw i think dp[2][i] doesnt gives u the max count of (b) unless u make dp[2][i + 1] = max(dp[1][i] + s[i]=='b', dp[2][i]) + (s[i] == 'a')

Sorry i took so long to answer.

Anyway, i think the problem with your code is that u are erasing from s[i.second] and iterating over it the same time.

After s[i.second].erase(k); the iterator k is invalidated so u shouldnt erase from the set while iterating over it. Check this page out for more details on erase. But basically u should erase after the 'for' not while it's executing.

Another thing, i think it should be erase(j) because k is a subtring of j

I think memory isnt the problem, because if it were Codeforces would say Memory Limit Exceeded instead of Runtime Error. I suggest u check your code for errors since its probably the problem here

Can u explain it ?

thanks, i just registered at rcc, i thought it was a closed contest for Russians or something like that, gl and hf :D

Will there be a mirror contest on Codeforces ?

"You got the 0-th place" Thats hilarious !!!

On BarichekCodeforces Round #407, 9 years ago
0

me too !!! damn that 14 case

On BarichekCodeforces Round #407, 9 years ago
+3

haha, best reply ever :D

Why on earth would he do that ?

Thank you, finally with that example i understanded the solution :D

Can someone explain to me the solution of problem C, especially this part: "Then you can easily see that its enough to check only three function outputs: on substrings [a1..n], [a2..n] и [a3..n]"

+9

Hey dude, say whatever u want but don't mess with people's parents, they didn't do anything to u, peace out :)

thanks, i hope that it will be a good contest so that i can improve my skills :D

i saw ur comment and did the same thing :)

+3

Can anyone confirm to me that this contest won't be rated, because im not sure

-16

Yeahhh !!! More contest for me to decrease my rating

i've got a tiny bit quicker way to solve 768A Submission

+8

Yeah!!! You cheaters should be ashamed of your self. Instead of supporting each other your just fighting.