Hello, I have been trying to solve the following problem which was a part of Topcoder SRM 696 Div1 Easy.
I am unable to find a editorial for the problem and I am not able to solve it. Can someone please tell me how to approach this problem ?
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 156 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Hello, I have been trying to solve the following problem which was a part of Topcoder SRM 696 Div1 Easy.
I am unable to find a editorial for the problem and I am not able to solve it. Can someone please tell me how to approach this problem ?
Hello all, I am trying to solve the problem Sausage Maximization. I am solving it using the approach mentioned in the editorial for the question.
I am getting Wrong answer on Test 33 on the following submission. Submission
I have tried a lot of test cases, but I am unable to find any error in the implementation. It would be really helpful, if someone could point out some error in the implementation,
Hello all, I have tried unsuccessfully to solve the problem Bear and the Polynomials
I am unable to understand the editorial posted for the problem, can some one please post their approach to solve the problem, or explain the approach discussed in the editorial clearly.
Hello All,
I have been trying to solve the problem HomeTask, but I am unable to devise my own solution, nor I am able to understand the approach discussed in the problem.
Here is the problem Hometask
It would be really helpful, if somebody could tell me how to solve this question or maybe elaborate on the approach given in the editorial.
Thank you
Hello all, I am trying to understand the algorithm mentioned in the editorial for the following problem
Zuma Here is its editorial editorial.
In the case, when the ith color matches with the kth color in the range [i...j], shouldn't we be doing
D[i][j] = D[i+1][k-1] + D[k+1][j] + 1, instead of
D[i][j] = D[i+1][k-1] + D[k+1][j]
?
This is because, we have to destroy the matching characters in ith position with kth position also, which will take 1 step extra.
Hello, in this article I would be telling an alternative solution to the problem 580B - Kefa and Company
Most of the solutions , which I have seen use Binary search to solve the problem after sorting of course, so the overall complexity of the solution is O(nlogn) + O(nlogn). I am discussing approach with the complexity of O(nlogn) + O(n). Here , the first O(nlogn) is due to sorting. So, after sorting there is a great improvement in the algorithm complexity. My approach is similar to Z-algorithm for string matching.
Just like Z-algorithm, we maintain a Z[i] array which will contain two things (ie a pair<int,int>), first the maximum index till which we can invite friends starting at ith position and second the total cost of doing so.
Now, while iterating over the entire array, we check whether the current index is less than the Z[i-1].first, if it is so then we immediately know that Z[i].first is at least Z[i-1].first and we iterate from there and update the Z array.
For any clarification, please see my following submission 13210753
Name |
---|