答案1
用foreach
会更好,但你可以从这个开始
\documentclass[a4paper,11pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning, shapes}
\begin{document}
\begin{tikzpicture}[mynode/.style={regular polygon, regular polygon sides=4,
minimum size=2cm, shape border rotate=45, draw}]
\node[mynode, label={135:1}, label={-90:$A_1$}] (00) {0};
\node[mynode, above right= -\pgflinewidth of 00, label={135:2}] (01) {1500};
\node[mynode, above right= -\pgflinewidth of 01, label={135:3}, label={45:1}, label=90:$m$] (02) {1000};
\node[mynode, below right= -\pgflinewidth of 01, fill=black!30,label={-90:$A_2$}] (10) {1200};
\node[mynode, above right= -\pgflinewidth of 10] (10) {1500};
\node[mynode, below right= -\pgflinewidth of 10, fill=black!20, label={-90:$A_3$}] (120) {0};
\end{tikzpicture}
\end{document}