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 | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
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 |
---|