Who help me solve this problem ? Thank you

Revision en2, by mike_wasabi, 2019-05-29 09:59:42

Count how many different arrays a[1], a[2], ..., a[n] where a[i] receives integer values positive in paragraph [1, M] so that there exists at least one paragraph K of the same consecutive value ?. Here the two arrays are different if there exists at least one position where the two array values ​​are in this position is different (n, M, K <= 1e6) e.g: input: 3 2 2 output: 6 Explanation: The array found is (1,1,1); (1,1,2); (1,2,2); (2,1,1); (2,2,1);(2,2,2)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English mike_wasabi 2019-05-29 12:20:27 454
en2 English mike_wasabi 2019-05-29 09:59:42 87
en1 English mike_wasabi 2019-05-29 07:34:01 424 Initial revision (published)