Lexicographically smallest string without three consecutive alphabets

Правка en1, от pista_chios, 2023-08-12 03:12:45

Given counts of A,B,C, we need to form the lexicographically smallest string using all A, B, C. It is guaranteed that one can always form a valid string. The backtracking solution is trivial however how can we do it given the constraints?

1<=(A+B+C)<=10^5

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский pista_chios 2023-08-12 03:14:40 2 Tiny change: 'aints?\n\n1<=(A+B+C)<' -> 'aints?\n\n0<=(A+B+C)<'
en2 Английский pista_chios 2023-08-12 03:14:01 56
en1 Английский pista_chios 2023-08-12 03:12:45 327 Initial revision (published)