|
+1
ABC was too easy this contest. |
|
0
I understood the editorial algorithm for C, but can someone help me with why the greedy algorithm is correct? I am unable to prove it. Thanks alot! |
|
0
For problem C I kept on overthinking that the solution would involve DP, however I did notice that the constraints on $$$x$$$ was too big and that it would most probably lead to TLE. However, can anyone think if DP is feasible for problem C if $$$x$$$ was actually some small number? |
|
0
My approach on C: If we consider a maximal block of same character sequence of size say $$$l$$$ then the number of ways we can pick an element to survive in that block is $$$l$$$ ways, after which there exists $$$(l-1)!$$$ arrangements to delete the remaining elements in the block. Hence there exists a total of $$$(l - 1)! \times l = l!$$$ ways within the block to perform the valid operation. And if there are $$$k$$$ such blocks then there exists a total of $$$\prod_{i}^{k}l_{i}!$$$ valid operations. This approach fails however, not sure why. Any help/corrections appreciated! |
|
0
Can someone help me with understanding my solution to B more clearly? I tried using binary search by answer here. I felt it was a plausible solution since if a radius (say r) is an answer then all radiis > r are also the answer. I tried implementing some solution, didnt work, maybe my impl on binary searching for real answers suck. Help/Correction appreciated! |
|
0
Hi I was upsolving the C problem, can someone tell me why this wont pass the second test case? Thanks in advanced! my solution |
|
+3
This one passed the pretests (for now) and is not a dp solution but what i basically thought was that the palindrome of length 2 or 3 should not exist, so basically
If it does happen then I change the values of |
|
0
Can someone explain why did this solution TLE's? My Solution |
|
0
But the time limit for D is 2s, so shouldn't the cap be 10^10 approx? |
|
0
Im pretty sure my code will pass all test cases if not due to TLE. |
|
0
The time limit for D is 2s, so can O(N^2) solution work for D? My solution for D |
|
0
Oh, thanks for your help! |
|
0
Can someone explain why this wont pass third test case for problem B? 87097426 |
|
0
How does https://mirror.codeforces.com/contest/1358/submission/81520389 exceed time limit? since max of a is 2*10^5 or just O(2n) how does it exceed TL?? It passed the pretests during the contest, but i saw that after the contest i got it wrong :( |