Nastya Is Transposing Matrices ( CodeForces 1136C )

该博客讨论了如何通过无限次转置矩阵A中的子矩阵来判断能否将其变为矩阵B。关键在于,无论进行多少次转置,矩阵的反对角线上的元素集合保持不变。只要A和B的每条反对角线上元素构成的集合相同,就可能通过转置操作将A变换为B。
摘要由CSDN通过智能技术生成

欢迎访问https://blog.csdn.net/lxt_Lucia~~

宇宙第一小仙女\(^o^)/~萌量爆表求带飞=≡Σ((( つ^o^)つ~ dalao们点个关注呗~

 

--------------------------------我只是一条可爱哒分界线-------------------------------

 

一、问题:

Description

Nastya came to her informatics lesson, and her teacher who is, by the way, a little bit famous here gave her the following task.

Two matrices A and B are given, each of them has size n×m. Nastya can perform the following operation to matrix A unlimited number of times:

  • take any square square submatrix of A and transpose it (i.e. the element of the submatrix which was in the i-th row and j-th column of the submatrix will be in the j-th row and i-th column after transposing, and the transposed submatrix itself will keep its place in the matrix A).

Nastya's task is to check whether it is possible to transform the matrix A to the matr

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值