CMC input n, k. Take the numbers from 1 to n and partition them nto k sets (k<=n). You should take the numbers from largest to smallest and add it to the set with the current smallest sum.
I have a question about imap_unordered. I am using it in a method in a class in linux (using fork). It pickles self for each item in the iterable. Why does it need to repickle each time (which is slow in my case)? I can't see how self can be changed between one item and the next