| # | User | Rating |
|---|---|---|
| 1 | jiangly | 3810 |
| 2 | Benq | 3676 |
| 3 | Kevin114514 | 3655 |
| 4 | maroonrk | 3463 |
| 5 | strapple | 3447 |
| 6 | Um_nik | 3387 |
| 7 | heuristica | 3322 |
| 8 | turmax | 3317 |
| 9 | tourist | 3307 |
| 10 | jiangbowen | 3291 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 156 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | Um_nik | 143 |
| 5 | Errichto | 139 |
| 6 | adamant | 137 |
| 7 | AmShZ | 135 |
| 8 | maroonrk | 133 |
| 9 | BledDest | 132 |
| 10 | qwexd | 129 |
|
+1
ahh , now i see it // i forgot to verify the conditon with aim>=0 ;;; wasted almost whole hr of contest forgetting to check smth so basic, thanks! |
|
0
Brother i would really appreciate if you could help me here like where did i mess up the derivation help me where i went wrong so either all bordering elements are deleted or multiplied so either no*of unique elements are deleted ; or they are multiplied so u can assume for any set ( 1,1,2,2,2,3,3,3) is equal to (1,2,2,3,3) cause u can easily get it as diff would be divisible by the no of unique elements present and if we are aiming for size k : it wouldnt matter if we started on either of those above array i gave u lets save that above array as freq {1,2,2 } here since bordering element are same deleted or same added if for a k ;; a element with freq f is present in that construction then b element with freq f also must be present in that condition and would be in the same way to reach that construction starting from lowest freq 1 , cause ;; if we do any operation 1 would be gone and wouldnt be able to contribute in further formation of arrangements that reaches 'k' and for that elem with freq 1 to reach the element whilst its present ; it must have a min freq of [1] ;; so the difference of element caused to make that element reach that freq of one so we can further construct would be — Current_freq_total — or n number of element lets say n ; so while making it one all the element having frequency greater than or equal to 1 will also lose equal amount of freq -> let that unique number be occurence -- and it would also be the no we will lose or gain if we do further operation in it so diff = n — { occurence * (currentfreq — 1) ) :: also here occurence would be so ;; our aim is size = k so to be able to reach size_k ;;; it would have to be aim = diff + x*occurence ;;; or for this to be feasible ;; aim- diff % occurence should be 0 ; so if this is the case we do ans ++ ?? no where did i mess up my derivation it fails on the test case 3 1 1 2 2 **** it gives 2 instead of 1 its supposed to output and this is the main codeblock Thanks for your time , really appreciated ;; |
| Name |
|---|


