Guest User

Untitled

a guest
Jan 1st, 2017
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. I was going through problem E editorial . As per my understanding if make matrix for "16" ,
  2. then initially I will construct matrix for "1" and then "6" and then "16" ,
  3. normally according to segment tree merge operation.
  4.  
  5. Now "1"'s matrix (as per my understanding of your state diagram) should look like :
  6.  
  7.  
  8. __|_____________
  9. | 0 0 0 0 0
  10. | 0 0 0 0 0
  11. | 0 0 1 0 0
  12. | 0 0 0 0 0
  13. | 0 0 0 0 0
  14.  
  15. and "6"'s matrix should look like :
  16. __|_____________
  17. | 0 0 0 0 0
  18. | 0 0 0 0 0
  19. | 0 0 0 0 0
  20. | 0 0 0 1 0
  21. | 0 0 0 0 1
  22. and "16"'s matrix should look like :
  23.  
  24. __|_____________
  25. | 0 0 0 0 0
  26. | 0 0 0 0 0
  27. | 0 0 1 1 1
  28. | 0 0 0 1 1
  29. | 0 0 0 0 1
  30. Now my main problem is understanding merge operation , will matrix be multiplied
  31. during concatenation or simply added . Now for that I tried both adding and multiplication .
  32. Multiplication is leading to definite null matrix . However adding is not leading to "16"'s matrix as
  33. you can see.
  34. So which operation is to be applied ?
Add Comment
Please, Sign In to add comment