How to create a segment tree containing matrix at each node?

In MATRIX QUERIES-1 ,i need to create a segment tree where each node contains a 2*2 matrix. how do i create this tree ?

@devansh32
hello devansh,
2*2 ,matrix basically stores 4 value . so u can declare a structure of four variable . then build a segment tree of that structure

@devansh32
refer this code -> https://ide.codingblocks.com/s/200765

thanks this was very helpful