You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ddd/images/suanfa.svg

512 lines
35 KiB

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created by Flowgorithm 3.4.2 (http://flowgorithm.org) -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="5652" height="13284">
<rect x="0" y="0" width="5652" height="13284" fill="#FFFFFF"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="648,288 648,375"/>
<polygon fill="#404040" stroke="none" points="648,396 668,361 627,361"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="648,9900 648,12975"/>
<polygon fill="#404040" stroke="none" points="648,12996 668,12961 627,12961"/>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="5" stroke-dasharray="none" d="M 504,144 A 72 72, 0, 0 0, 504 288 L 792,288 A 72 72, 0, 0 0, 792 144 Z"/>
<text x="648" y="165" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="648" dy="72" unicode-bidi="embed">&#24320;&#22987;</tspan>
</text>
</g>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="5" stroke-dasharray="none" d="M 504,12996 A 72 72, 0, 0 0, 504 13140 L 792,13140 A 72 72, 0, 0 0, 792 12996 Z"/>
<text x="648" y="13017" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="648" dy="72" unicode-bidi="embed">&#32467;&#26463;</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="648,576 648,663"/>
<polygon fill="#404040" stroke="none" points="648,684 668,649 627,649"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="648,828 648,915"/>
<polygon fill="#404040" stroke="none" points="648,936 668,901 627,901"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="648,1080 648,1167"/>
<polygon fill="#404040" stroke="none" points="648,1188 668,1153 627,1153"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="648,1440 648,1527"/>
<polygon fill="#404040" stroke="none" points="648,1548 668,1513 627,1513"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="648,1800 648,1923"/>
<polygon fill="#404040" stroke="none" points="648,1944 668,1909 627,1909"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="648,2088 648,3399"/>
<polygon fill="#404040" stroke="none" points="648,3420 668,3385 627,3385"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="648,3564 648,3651"/>
<polygon fill="#404040" stroke="none" points="648,3672 668,3637 627,3637"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="648,3816 648,3939"/>
<polygon fill="#404040" stroke="none" points="648,3960 668,3925 627,3925"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="648,4104 648,9375"/>
<polygon fill="#404040" stroke="none" points="648,9396 668,9361 627,9361"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="648,9612 648,9735"/>
<polygon fill="#404040" stroke="none" points="648,9756 668,9721 627,9721"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 396,396 L 396,576 L 900,576 L 900,396 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" points="396,432 900,432"/>
<polyline fill="none" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" points="432,396 432,576"/>
<text x="666" y="453" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="666" dy="72" unicode-bidi="embed">&#25972;&#25968;&#20540; num2</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 432,684 L 432,828 L 864,828 L 864,684 Z"/>
<text x="648" y="705" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="648" dy="72" unicode-bidi="embed">num2 = 0</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 360,936 L 360,1080 L 936,1080 L 936,936 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="5" stroke-dasharray="none" points="396,936 396,1080"/>
<polyline fill="none" stroke="#602020" stroke-width="5" stroke-dasharray="none" points="900,936 900,1080"/>
<text x="648" y="957" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="648" dy="72" unicode-bidi="embed">void Dijkstra()</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 216,1188 L 216,1440 L 1080,1440 L 1080,1188 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" points="216,1224 1080,1224"/>
<polyline fill="none" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" points="252,1188 252,1440"/>
<text x="666" y="1245" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="666" dy="72" unicode-bidi="embed">&#25972;&#25968;&#20540; v1, v2, min, i, j, u,</tspan>
<tspan x="666" dy="72" unicode-bidi="embed"> pre</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 216,1548 L 216,1800 L 1080,1800 L 1080,1548 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" points="216,1584 1080,1584"/>
<polyline fill="none" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" points="252,1548 252,1800"/>
<text x="666" y="1605" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="666" dy="72" unicode-bidi="embed">&#25972;&#25968;&#20540; Array dist[MAX], s</tspan>
<tspan x="666" dy="72" unicode-bidi="embed">[MAX], path[MAX]</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="936,2016 1620,2016 1620,2139"/>
<polygon fill="#404040" stroke="none" points="1620,2160 1640,2125 1599,2125"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1620,3168 1620,3276 720,3276 720,2108"/>
<polygon fill="#404040" stroke="none" points="720,2088 699,2122 740,2122"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1620,2304 1620,2391"/>
<polygon fill="#404040" stroke="none" points="1620,2412 1640,2377 1599,2377"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 1404,2160 L 1404,2304 L 1836,2304 L 1836,2160 Z"/>
<text x="1620" y="2181" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1620" dy="72" unicode-bidi="embed">s[i] = 0</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1944,2592 2124,2592 2124,2823"/>
<polygon fill="#404040" stroke="none" points="2124,2844 2144,2809 2103,2809"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2124,2988 2124,3132 1676,3132"/>
<polygon fill="#404040" stroke="none" points="1656,3132 1690,3152 1690,3111"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1296,2592 1116,2592 1116,2823"/>
<polygon fill="#404040" stroke="none" points="1116,2844 1136,2809 1095,2809"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1116,2988 1116,3132 1563,3132"/>
<polygon fill="#404040" stroke="none" points="1584,3132 1549,3111 1549,3152"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 1620,2412 L 1260,2592 L 1620,2772 L 1980,2592 Z"/>
<text x="1620" y="2541" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1620" dy="72" unicode-bidi="embed">cont[v1][i]&lt;MAX</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 1908,2844 L 1908,2988 L 2340,2988 L 2340,2844 Z"/>
<text x="2124" y="2865" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2124" dy="72" unicode-bidi="embed">path[i] = v1</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 900,2844 L 900,2988 L 1332,2988 L 1332,2844 Z"/>
<text x="1116" y="2865" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1116" dy="72" unicode-bidi="embed">path[i] = -1</tspan>
</text>
</g>
<ellipse cx="1620" cy="3132" rx="36" ry="36" fill="#C04040" stroke="#602020" stroke-width="5"/>
<text x="2052" y="2469" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2052" dy="72" unicode-bidi="embed">&#30495;</tspan>
</text>
<text x="1188" y="2469" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1188" dy="72" unicode-bidi="embed">&#20551;</tspan>
</text>
</g>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="5" stroke-dasharray="none" d="M 432,1944 L 360,2016 L 432,2088 L 864,2088 L 936,2016 L 864,1944 Z"/>
<text x="648" y="1965" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="648" dy="72" unicode-bidi="embed">i = 0 &#21040; num</tspan>
</text>
</g>
<text x="1080" y="1893" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1080" dy="72" unicode-bidi="embed">&#19979;&#19968;&#20010;</tspan>
</text>
<text x="540" y="2109" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="540" dy="72" unicode-bidi="embed">&#23436;&#25104;</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 432,3420 L 432,3564 L 864,3564 L 864,3420 Z"/>
<text x="648" y="3441" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="648" dy="72" unicode-bidi="embed">s[v1] = 1</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 432,3672 L 432,3816 L 864,3816 L 864,3672 Z"/>
<text x="648" y="3693" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="648" dy="72" unicode-bidi="embed">path[v1] = 0</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="936,4032 1188,4032 1188,4155"/>
<polygon fill="#404040" stroke="none" points="1188,4176 1208,4141 1167,4141"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1188,4860 1188,9252 720,9252 720,4124"/>
<polygon fill="#404040" stroke="none" points="720,4104 699,4138 740,4138"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1188,4320 1188,4407"/>
<polygon fill="#404040" stroke="none" points="1188,4428 1208,4393 1167,4393"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1188,4572 1188,4695"/>
<polygon fill="#404040" stroke="none" points="1188,4716 1208,4681 1167,4681"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 972,4176 L 972,4320 L 1404,4320 L 1404,4176 Z"/>
<text x="1188" y="4197" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1188" dy="72" unicode-bidi="embed">min = MAX</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 972,4428 L 972,4572 L 1404,4572 L 1404,4428 Z"/>
<text x="1188" y="4449" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1188" dy="72" unicode-bidi="embed">u = -1</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1476,4788 1980,4788 1980,4911"/>
<polygon fill="#404040" stroke="none" points="1980,4932 2000,4897 1959,4897"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1980,9000 1980,9108 1260,9108 1260,4880"/>
<polygon fill="#404040" stroke="none" points="1260,4860 1239,4894 1280,4894"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2340,5148 2520,5148 2520,5415"/>
<polygon fill="#404040" stroke="none" points="2520,5436 2540,5401 2499,5401"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2520,8820 2520,8964 2036,8964"/>
<polygon fill="#404040" stroke="none" points="2016,8964 2050,8984 2050,8943"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1620,5148 1440,5148 1440,8964 1923,8964"/>
<polygon fill="#404040" stroke="none" points="1944,8964 1909,8943 1909,8984"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="5" stroke-dasharray="none" d="M 1980,4932 L 1584,5148 L 1980,5364 L 2376,5148 Z"/>
<text x="1980" y="5097" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1980" dy="72" unicode-bidi="embed">s[j]==0&amp;&amp;dist[j]&lt;min</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2520,5580 2520,5667"/>
<polygon fill="#404040" stroke="none" points="2520,5688 2540,5653 2499,5653"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2520,5832 2520,5919"/>
<polygon fill="#404040" stroke="none" points="2520,5940 2540,5905 2499,5905"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 2304,5436 L 2304,5580 L 2736,5580 L 2736,5436 Z"/>
<text x="2520" y="5457" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2520" dy="72" unicode-bidi="embed">u = j</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 2304,5688 L 2304,5832 L 2736,5832 L 2736,5688 Z"/>
<text x="2520" y="5709" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2520" dy="72" unicode-bidi="embed">min = dist[j]</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2700,6048 2880,6048 2880,6207"/>
<polygon fill="#404040" stroke="none" points="2880,6228 2900,6193 2859,6193"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2880,6660 2880,8784 2576,8784"/>
<polygon fill="#404040" stroke="none" points="2556,8784 2590,8804 2590,8763"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2340,6048 2160,6048 2160,8784 2463,8784"/>
<polygon fill="#404040" stroke="none" points="2484,8784 2449,8763 2449,8804"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="5" stroke-dasharray="none" d="M 2520,5940 L 2304,6048 L 2520,6156 L 2736,6048 Z"/>
<text x="2520" y="5997" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2520" dy="72" unicode-bidi="embed">u!=-1</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2880,6372 2880,6495"/>
<polygon fill="#404040" stroke="none" points="2880,6516 2900,6481 2859,6481"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 2664,6228 L 2664,6372 L 3096,6372 L 3096,6228 Z"/>
<text x="2880" y="6249" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2880" dy="72" unicode-bidi="embed">s[u] = 1</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="3168,6588 3492,6588 3492,6711"/>
<polygon fill="#404040" stroke="none" points="3492,6732 3512,6697 3471,6697"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="3492,8496 3492,8604 2952,8604 2952,6680"/>
<polygon fill="#404040" stroke="none" points="2952,6660 2931,6694 2972,6694"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="3672,6840 4356,6840 4356,6999"/>
<polygon fill="#404040" stroke="none" points="4356,7020 4376,6985 4335,6985"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="4356,8316 4356,8460 3548,8460"/>
<polygon fill="#404040" stroke="none" points="3528,8460 3562,8480 3562,8439"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="3312,6840 3132,6840 3132,8460 3435,8460"/>
<polygon fill="#404040" stroke="none" points="3456,8460 3421,8439 3421,8480"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="5" stroke-dasharray="none" d="M 3492,6732 L 3276,6840 L 3492,6948 L 3708,6840 Z"/>
<text x="3492" y="6789" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="3492" dy="72" unicode-bidi="embed">s[j]==0</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="4932,7344 5112,7344 5112,7719"/>
<polygon fill="#404040" stroke="none" points="5112,7740 5132,7705 5091,7705"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="5112,8136 5112,8280 4412,8280"/>
<polygon fill="#404040" stroke="none" points="4392,8280 4426,8300 4426,8259"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="3780,7344 3600,7344 3600,8280 4299,8280"/>
<polygon fill="#404040" stroke="none" points="4320,8280 4285,8259 4285,8300"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 4356,7020 L 3744,7344 L 4356,7668 L 4968,7344 Z"/>
<text x="4356" y="7257" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="4356" dy="72" unicode-bidi="embed">cont[u][j]&lt;MAX&amp;&amp;dist[u]+cont</tspan>
<tspan x="4356" dy="72" unicode-bidi="embed">[u][j]&lt;dist[j]</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="5112,7884 5112,7971"/>
<polygon fill="#404040" stroke="none" points="5112,7992 5132,7957 5091,7957"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 4716,7740 L 4716,7884 L 5508,7884 L 5508,7740 Z"/>
<text x="5112" y="7761" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="5112" dy="72" unicode-bidi="embed">dist[j] = dist[u]+cont[u][j]</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 4896,7992 L 4896,8136 L 5328,8136 L 5328,7992 Z"/>
<text x="5112" y="8013" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="5112" dy="72" unicode-bidi="embed">path[j] = u</tspan>
</text>
</g>
</g>
<g>
</g>
<ellipse cx="4356" cy="8280" rx="36" ry="36" fill="#C04040" stroke="#602020" stroke-width="5"/>
<text x="5040" y="7221" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="5040" dy="72" unicode-bidi="embed">&#30495;</tspan>
</text>
<text x="3672" y="7221" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="3672" dy="72" unicode-bidi="embed">&#20551;</tspan>
</text>
</g>
<g>
</g>
<ellipse cx="3492" cy="8460" rx="36" ry="36" fill="#FFD0D0" stroke="#A07070" stroke-width="5"/>
<text x="3780" y="6717" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="3780" dy="72" unicode-bidi="embed">&#30495;</tspan>
</text>
<text x="3204" y="6717" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="3204" dy="72" unicode-bidi="embed">&#20551;</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="5" stroke-dasharray="none" d="M 2664,6516 L 2592,6588 L 2664,6660 L 3096,6660 L 3168,6588 L 3096,6516 Z"/>
<text x="2880" y="6537" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2880" dy="72" unicode-bidi="embed">j = 0 &#21040; num</tspan>
</text>
</g>
<text x="3312" y="6465" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="3312" dy="72" unicode-bidi="embed">&#19979;&#19968;&#20010;</tspan>
</text>
<text x="2772" y="6681" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2772" dy="72" unicode-bidi="embed">&#23436;&#25104;</tspan>
</text>
</g>
</g>
<g>
</g>
<ellipse cx="2520" cy="8784" rx="36" ry="36" fill="#FFD0D0" stroke="#A07070" stroke-width="5"/>
<text x="2808" y="5925" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2808" dy="72" unicode-bidi="embed">&#30495;</tspan>
</text>
<text x="2232" y="5925" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2232" dy="72" unicode-bidi="embed">&#20551;</tspan>
</text>
</g>
</g>
<g>
</g>
<ellipse cx="1980" cy="8964" rx="36" ry="36" fill="#FFD0D0" stroke="#A07070" stroke-width="5"/>
<text x="2448" y="5025" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2448" dy="72" unicode-bidi="embed">&#30495;</tspan>
</text>
<text x="1512" y="5025" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1512" dy="72" unicode-bidi="embed">&#20551;</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="5" stroke-dasharray="none" d="M 972,4716 L 900,4788 L 972,4860 L 1404,4860 L 1476,4788 L 1404,4716 Z"/>
<text x="1188" y="4737" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1188" dy="72" unicode-bidi="embed">j = 0 &#21040; num</tspan>
</text>
</g>
<text x="1620" y="4665" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1620" dy="72" unicode-bidi="embed">&#19979;&#19968;&#20010;</tspan>
</text>
<text x="1080" y="4881" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1080" dy="72" unicode-bidi="embed">&#23436;&#25104;</tspan>
</text>
</g>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="5" stroke-dasharray="none" d="M 432,3960 L 360,4032 L 432,4104 L 864,4104 L 936,4032 L 864,3960 Z"/>
<text x="648" y="3981" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="648" dy="72" unicode-bidi="embed">i = 0 &#21040; num</tspan>
</text>
</g>
<text x="1080" y="3909" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1080" dy="72" unicode-bidi="embed">&#19979;&#19968;&#20010;</tspan>
</text>
<text x="540" y="4125" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="540" dy="72" unicode-bidi="embed">&#23436;&#25104;</tspan>
</text>
</g>
<g>
<path fill="#D0FFD0" stroke="#70A070" stroke-width="5" stroke-dasharray="none" d="M 252,9396 L 144,9612 L 1044,9612 L 1152,9396 Z"/>
<text x="648" y="9417" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="648" dy="72" unicode-bidi="embed">&#36755;&#20986; &quot;&#26234;&#33021;&#25512;&#33616;&#36335;&#32447;&#22914;&#19979;</tspan>
<tspan x="648" dy="72" unicode-bidi="embed">(&#36870;&#24207;):\n&quot;</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="936,9828 1728,9828 1728,9951"/>
<polygon fill="#404040" stroke="none" points="1728,9972 1748,9937 1707,9937"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1728,12744 1728,12852 720,12852 720,9920"/>
<polygon fill="#404040" stroke="none" points="720,9900 699,9934 740,9934"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2016,10152 2340,10152 2340,10383"/>
<polygon fill="#404040" stroke="none" points="2340,10404 2360,10369 2319,10369"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2340,12564 2340,12708 1784,12708"/>
<polygon fill="#404040" stroke="none" points="1764,12708 1798,12728 1798,12687"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1440,10152 1260,10152 1260,10383"/>
<polygon fill="#404040" stroke="none" points="1260,10404 1280,10369 1239,10369"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1260,10548 1260,12708 1671,12708"/>
<polygon fill="#404040" stroke="none" points="1692,12708 1657,12687 1657,12728"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="5" stroke-dasharray="none" d="M 1728,9972 L 1404,10152 L 1728,10332 L 2052,10152 Z"/>
<text x="1728" y="10101" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1728" dy="72" unicode-bidi="embed">i!=v1&amp;&amp;i==v2</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2340,12240 2340,12327"/>
<polygon fill="#404040" stroke="none" points="2340,12348 2360,12313 2319,12313"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2520,10512 2700,10512 2700,10671"/>
<polygon fill="#404040" stroke="none" points="2700,10692 2720,10657 2679,10657"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2700,11376 2700,12204 2396,12204"/>
<polygon fill="#404040" stroke="none" points="2376,12204 2410,12224 2410,12183"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2160,10512 1980,10512 1980,12204 2283,12204"/>
<polygon fill="#404040" stroke="none" points="2304,12204 2269,12183 2269,12224"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="5" stroke-dasharray="none" d="M 2340,10404 L 2124,10512 L 2340,10620 L 2556,10512 Z"/>
<text x="2340" y="10461" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2340" dy="72" unicode-bidi="embed">s[i]==1</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2700,10836 2700,10923"/>
<polygon fill="#404040" stroke="none" points="2700,10944 2720,10909 2679,10909"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2700,11088 2700,11211"/>
<polygon fill="#404040" stroke="none" points="2700,11232 2720,11197 2679,11197"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 2448,10692 L 2448,10836 L 2952,10836 L 2952,10692 Z"/>
<text x="2700" y="10713" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2700" dy="72" unicode-bidi="embed">num2 = dist[i]</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 2484,10944 L 2484,11088 L 2916,11088 L 2916,10944 Z"/>
<text x="2700" y="10965" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2700" dy="72" unicode-bidi="embed">pre = i</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2916,11304 3420,11304 3420,11427"/>
<polygon fill="#404040" stroke="none" points="3420,11448 3440,11413 3399,11413"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="3420,11916 3420,12024 2772,12024 2772,11396"/>
<polygon fill="#404040" stroke="none" points="2772,11376 2751,11410 2792,11410"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="3420,11664 3420,11751"/>
<polygon fill="#404040" stroke="none" points="3420,11772 3440,11737 3399,11737"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 3024,11448 L 2916,11664 L 3816,11664 L 3924,11448 Z"/>
<text x="3420" y="11469" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="3420" dy="72" unicode-bidi="embed">&#36755;&#20986; &quot;%s--&gt;&quot;,nm.adjust</tspan>
<tspan x="3420" dy="72" unicode-bidi="embed">[pre].name</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 3168,11772 L 3168,11916 L 3672,11916 L 3672,11772 Z"/>
<text x="3420" y="11793" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="3420" dy="72" unicode-bidi="embed">pre = path[pre]</tspan>
</text>
</g>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="5" stroke-dasharray="none" d="M 2556,11232 L 2484,11304 L 2556,11376 L 2844,11376 L 2916,11304 L 2844,11232 Z"/>
<text x="2700" y="11253" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2700" dy="72" unicode-bidi="embed">pre!=v</tspan>
</text>
</g>
<text x="2988" y="11181" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2988" dy="72" unicode-bidi="embed">&#30495;</tspan>
</text>
<text x="2628" y="11397" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2628" dy="72" unicode-bidi="embed">&#20551;</tspan>
</text>
</g>
</g>
<g>
</g>
<ellipse cx="2340" cy="12204" rx="36" ry="36" fill="#FFD0D0" stroke="#A07070" stroke-width="5"/>
<text x="2628" y="10389" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2628" dy="72" unicode-bidi="embed">&#30495;</tspan>
</text>
<text x="2052" y="10389" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2052" dy="72" unicode-bidi="embed">&#20551;</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 1908,12348 L 1800,12564 L 2772,12564 L 2880,12348 Z"/>
<text x="2340" y="12369" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2340" dy="72" unicode-bidi="embed">&#36755;&#20986; &quot;%s&quot;,nm.adjust[pre].</tspan>
<tspan x="2340" dy="72" unicode-bidi="embed">name</tspan>
</text>
</g>
</g>
<g>
<path fill="#D0FFD0" stroke="#70A070" stroke-width="5" stroke-dasharray="none" d="M 972,10404 L 900,10548 L 1548,10548 L 1620,10404 Z"/>
<text x="1260" y="10425" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1260" dy="72" unicode-bidi="embed">&#36755;&#20986; &#36335;&#24452;&#19981;&#23384;&#22312;</tspan>
</text>
</g>
<ellipse cx="1728" cy="12708" rx="36" ry="36" fill="#FFD0D0" stroke="#A07070" stroke-width="5"/>
<text x="2124" y="10029" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2124" dy="72" unicode-bidi="embed">&#30495;</tspan>
</text>
<text x="1332" y="10029" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1332" dy="72" unicode-bidi="embed">&#20551;</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="5" stroke-dasharray="none" d="M 432,9756 L 360,9828 L 432,9900 L 864,9900 L 936,9828 L 864,9756 Z"/>
<text x="648" y="9777" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="648" dy="72" unicode-bidi="embed">i = 0 &#21040; num</tspan>
</text>
</g>
<text x="1080" y="9705" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1080" dy="72" unicode-bidi="embed">&#19979;&#19968;&#20010;</tspan>
</text>
<text x="540" y="9921" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="540" dy="72" unicode-bidi="embed">&#23436;&#25104;</tspan>
</text>
</g>
</g>
</g>
</svg>