Need help with combinatorics

Правка en1, от Mohamed_Saad62, 2019-11-02 15:20:47

Given a string consist just of the letter 'u' ,if we can consider every two adjacent 'u' -->' w' and every u can be used only once in how many ways the string can appear ?

example : uuu can be uuu or wu or u**w** so the answer is 3 .

I am asking this question because at the last contest I was trying to solve this problem https://codeforces.me/contest/1245/problem/C and I claim the solution is every continuous 'u' or 'n' I save in how many ways it can appear in a vector and then multiply all the numbers and this is the answer .

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский Mohamed_Saad62 2019-11-02 15:22:53 1 Tiny change: '*w**u or u**w**\n s' -> '*w**u or u **w**\n s'
en2 Английский Mohamed_Saad62 2019-11-02 15:21:19 0 Tiny change: '*w**u or u**w**\n so the' -> '*w**u or u\n so the'
en1 Английский Mohamed_Saad62 2019-11-02 15:20:47 597 Initial revision (published)