顺时针打印矩阵
#include<iostream>
#include<vector>
using namespace std;
//顺时针打印一个矩阵
class Printer {
public:
vector<int> clockwisePrint(vector<vector<int> > mat, int n, int m) {
// 思路是先接收外边一圈的数据,再接收收缩一圈的数据,然后依次缩小矩阵
//这四个最外边的边框
int head = 0;//最上边横着的边
int end = n - 1;//最下边横着的边
int left = 0;//最左边竖着的边
int right = m - 1;//最右边竖着的边
vector<int> arr;
//只要有上下边或者左右边交错,出循环
while (head < end && left < right) {
if