|
|
вернуться в форумWhat algorithm is applicable for such problems? Hi Experts, Can you suggest how to approach solving such problems. I am getting no clues at all. Moreover we know nothing about total number of spaces in the text. regards Anupam Re: What algorithm is applicable for such problems? If you have a group with N spaces and apply to it the operation, that changes K spaces to one, then the number of spaces will be N/K + N%K. You should output such numbers K[1], K[2], ... , K[m], that for every number N in range [1..L] a sequence of operations N := (N/K[i] + N%K[i]) for each i = 1..m will make the value N equals 1. And then you should maximize the range for N. I guess it is a school problem :) Edited by author 25.01.2011 20:42 Edited by author 25.01.2011 20:43 |
|
|