I was wondering if anyone can help me with this problem, https://mendo.mk/Task.do?id=208.
The task gives you N — Number of strings where (1 < N < 5), and N strings made up of only characters a and b. The total length of all the strings is less then 50 001. You have to print the longest common substring out of all the strings. The length of their LCS is less or equal to 60. Time limit 600 milliseconds, Memory limit 64 mb. Ex.
Edit: The time limit is 100 millisecond and the memory limit is 64 mb. The problem states that there is a number N (1 <= N < 100 000 000 000) and I have to get to that number using the least amount of sums and the only numbers I can use are numbers that consist of only one digit ex. 1, 11, 111, 2, 22, 222, 3, 3333333, 9999999, ... let's call them K where (0 < K <= N). I have to output how many numbers were used and who they were. I'm trying to solve this in C++. Examples:
2 11 11111