托普利茨矩阵
using System;
namespace leecode1
{
class Program
{
static void Main(string[] args)
{
int[][] matrix = new int[3][];
matrix[0] =new int[] { 1,2,3,4};
matrix[1] = new int[] { 5, 1, 2, 3 };
matrix[2] = new int[] { 9, 5, 1, 2 };
for (int i = 0; i < matrix.Length - 1; i++)
{
for(int j = 0; j < matrix[i].Length - 1; j++)
{
if (matrix[i][j] != matrix[i + 1][j + 1])
{
Console.WriteLine("false");
}
}
}
Console.WriteLine("true");
Console.ReadKey();
}
}
}
浙公网安备 33010602011771号