| # | User | Rating |
|---|---|---|
| 1 | Kevin114514 | 3722 |
| 2 | Benq | 3676 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3408 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3196 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | maroonrk | 153 |
| 2 | Qingyu | 152 |
| 3 | nik_exists | 151 |
| 4 | AmShZ | 147 |
| 4 | maspy | 147 |
| 6 | Um_nik | 143 |
| 7 | Errichto | 139 |
| 8 | adamant | 136 |
| 9 | BledDest | 134 |
| 10 | AksLolCoding | 132 |
|
0
Thanks got you! |
|
0
How do you decide N=8191 ? It won't work with any other value. |
|
-7
And you are still unrated after 2 years |
|
On
randomrandom1810 →
An interesting problem that was asked in online hiring test of salesforce., 4 years ago
0
This comment might help https://codeforces.me/blog/entry/62570?#comment-465386 |
|
+3
You have to create a new temporary array where you store the index of last occurrence of all characters that you have encountered so far and then binary search on that array. if distinct characters(tempArr[mid],i)==(tempArr.size()-mid+1) then move left else you have find a potential character save it into variable (say fans) and move right in tempArray. Finally do ans+=fans; LINK->160405246 |
|
+8
How do you deduce this from query limit that binary search is to be used? |
|
0
I solved it using binary search on minimum possible answer we could obtain. In check function I checked for the minimum number of operations needed if I try to convert substring of length k into either RGB../GBR../BRG.. using prefix sum technique. If its >=mid it could be my potential answer. LINK:157491692 |
|
0
Thanks for the help I didn't noticed that. |
|
0
Can anyone help why is this giving me TLE for D 147473308 ? |
|
0
Which company's assessment? |
| Name |
|---|


