Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

akasakaR's blog

By akasakaR, history, 4 months ago, In English

Hello, So I was solving 718C - Sasha and Array, and it required me to code a whole matrix struct by itself, it doesn't support everything, but it's fine ig. I searched but couldn't find anything, I remember jiangly used it in one of his submissions but I couldn't find it. Does anyone mind sharing their own?

Mine: https://ideone.com/EYkUS2

  • Vote: I like it
  • -6
  • Vote: I do not like it

»
4 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

For operator* you can implement it as:

friend mat operator*(mat a, const mat &b) { return a *= b; }

Also pw(mat &a, ll b) should return the identity matrix with dimensions of $$$a$$$ for $$$b=0$$$.