方法一里面 if(x.second==y.first){} else if(x.first==y.second){} 这里不需要判断,只需要注意矩阵前后的相乘顺序,先出来的为y,后pop出来的为x,相乘顺序为x*y
2
牛客网
牛客网在线编程
牛客网题解
牛客企业服务