|  | 
|  | 
| вернуться в форум | Gospers hack Very good opportunity to apply Gosper's hack trick.
 m is number of different colors in the input.
 
 Then iterate through all subsets of size k of m.
Re: Gospers hack Послано Anti  28 ноя 2023 16:07It's really works. But I don't understand why this algo work. Can you explain me? | 
 | 
|