fork download
  1. \documentclass[dvipdfmx]{jsarticle}
  2. \usepackage{tikz}
  3. \usetikzlibrary{positioning}
  4. \begin{document}
  5. \begin{tikzpicture}[
  6. foo/.style={minimum width=2cm,minimum height=3cm,draw,fill=black!10,align=center}
  7. ]
  8. \node[foo] (a0) {\textit{0} 通り};
  9. \node[foo,below=of a0] (a1) {1 通り};
  10. \node[foo,right=of a0] (b0) {3 通り};
  11. \node[foo,below=of b0] (b1) {1 通り};
  12. \node[foo,right=of b0] (c0) {31 通り};
  13. \node[foo,below=of c0] (c1) {1 通り};
  14. \node[foo,right=of c0] (d0) {314 通り};
  15. \node[foo,below=of d0] (d1) {1 通り};
  16. \node[foo,right=of d0] (e0) {3141 通り};
  17. \node[foo,below=of e0] (e1) {1 通り};
  18. \node[foo,right=of e0] (f0) {31415 通り};
  19. \node[foo,below=of f0] (f1) {1 通り};
  20.  
  21. \foreach \u/\v in {a0/b0, b0/c0, c0/d0, d0/e0, e0/f0}{
  22. \draw[->] (\u) to node [above] {\texttt{*}} (\v);
  23. };
  24. \foreach \u/\v/\w in {a1/b0/{0,1,2}, b1/c0/{0}, c1/d0/{0,1,2,3}, d1/e0/{0}, e1/f0/{0,1,2,3,4}} {
  25. \draw[->] (\u) to node [left] {\texttt\w} (\v);
  26. };
  27. \foreach \u/\v/\w in {a1/b1/{3}, b1/c1/{1}, c1/d1/{4}, d1/e1/{1}, e1/f1/{5}} {
  28. \draw[->] (\u) to node [above] {\texttt\w} (\v);
  29. };
  30.  
  31. \end{tikzpicture}
  32. \end{document}
  33.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty