How many problems did you solve?
How many problems did you solve?
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | jiangly | 3670 |
| 3 | Kevin114514 | 3657 |
| 4 | maroonrk | 3355 |
| 5 | Um_nik | 3353 |
| 6 | squareOf105 | 3346 |
| 7 | tourist | 3343 |
| 8 | strapple | 3324 |
| 9 | heuristica | 3322 |
| 10 | jiangbowen | 3291 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | AmShZ | 143 |
| 5 | Um_nik | 141 |
| 6 | Errichto | 139 |
| 7 | adamant | 137 |
| 8 | BledDest | 133 |
| 8 | maroonrk | 133 |
| 10 | qwexd | 130 |
| Name |
|---|



Sorry but I am not a woman :P So NO
Could solve the first 2 completely...
I solved first 3 completely and 9/10 test cases of 4th
Great...could you please share your approach for the 3rd? There were so many cases to handle, couldn't figure out a universal solution... 4th was dp I guess which I am yet to learn:)
Are you among the winners?
The winner list is released — Link
arunimaSundar — You should be in top 3.
Also, for Prisonners of Baskerville, did you solve completely? I missed a few cases, specifically, 7th, 8th, and 10th.
Any idea what could be the issue?
My code passed all the testcases.Initially I was missing out the test case 0 0 0 0 ...,i.e, when all the cells were empty and there wasn't a single prisoner. Maybe you were missing out the same.
How did you guys solve Prisoners of Baskerville? I tried 2 pointers, but it failed a few cases as well.
I used a greedy approach tbh... First stored the sum of all the elements of the array in a variable (say sum).Then initialized a variable (say ind) with -1. Next, found out the first index starting from the left which had non-zero value and updated the ind with that index value.Then iterated the array from ind+1 till the the last second index and stored the count of all the zeros in a variable(say cnt). Finally the answer would be (sum+cnt)*input2 (input2 was the given cost of shifing the prisoners)...BUT do keep a check for the edge case 0 0 0 0... (when there are no prisoners at all).This case can be handled in the sum part only(if sum==0 then return 0).
Not in the top 10 though:( but any idea from where we can get the list of the top 50?
I think the winners would have received a mail. Strange, the questions were quite hard, and not sure how so many people got all correct, as the person who solve 3.9/4 doesn't got into the list..
hmm...that's weird though
Cannot participate:sadge: