Блог пользователя akasakaR

Автор akasakaR, история, 4 месяца назад, По-английски

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

  • Проголосовать: нравится
  • -6
  • Проголосовать: не нравится

»
4 месяца назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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$$$.