### Blagoj's blog

By Blagoj, history, 2 weeks ago,

I was wondering if anyone can help me with this problem, https://mendo.mk/Task.do?id=208.

• 0

By Blagoj, history, 4 weeks ago,

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.

Input:
2
abb
b
Output:
1 (b)

Input:
2
abaabab
babaabbbb
Output:
5 (аbааb)

• -3

By Blagoj, history, 6 weeks ago,

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:

input
338

output
2

5 333

input
11124

output
3

2 11 11111

input
22222222222

output
1

22222222222

• -10