| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3657 |
| 3 | jiangly | 3638 |
| 4 | turmax | 3442 |
| 5 | tourist | 3380 |
| 6 | Um_nik | 3353 |
| 7 | strapple | 3350 |
| 8 | squareOf105 | 3346 |
| 9 | heuristica | 3322 |
| 10 | maroonrk | 3310 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | nik_exists | 151 |
| 3 | maspy | 150 |
| 4 | AmShZ | 143 |
| 4 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | adamant | 137 |
| 8 | BledDest | 133 |
| 8 | maroonrk | 133 |
| 10 | Proof_by_QED | 131 |
|
+3
NOTE: I was not able to solve it during the contest, but I was able to do it afterwards. This is one type of binary_search problem. You will encounter many such problems. General binary_search which you might have studied(or will study) in the university is done over an array of numbers. In this kind of problems, you need to perform the binary_search over the entire solution space. For e.g.: In this problem, you can consider the entire solution space as all numbers ranging from 1 to n (as you cannot have more than "n" copies). So, step 1 of this problem is to find the maximum number of copies which can be cut out from the the given array. Let me call this value as Step 2 Now, given that if we want to cut out In order to answer this question we need to first construct a frequency array (In this we will store the frequency of all given numbers). We need to construct an array of length But there is an interesting catch here. Since, duplicates are allowed in the given answer, we might be able to use the same value again. So, we can use that value atmost So this is basically the Now coming back to Step 1. We need to figure out what values of Another thing to note is binary_search can only be done when the array(solution space) is monotonically increasing. In this case, as mentioned in the tutorial, if you can create, Here is my solution: http://codeforces.me/contest/1077/submission/45915120 |
| Name |
|---|


