https://leetcode-cn.com/problems/rearrange-products-table/solution/zong-jie-xing-zhuan-lie-lie-zhuan-xing-b-g2je/ 这个力扣里面有说行列互转的解法