Загрузка данных
<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net">
<diagram id="diagram-task2-both" name="Задание 2">
<mxGraphModel dx="1000" dy="800" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="800" pageHeight="600" background="#ffffff">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- ==================== СЛЕВА: getCount ==================== -->
<!-- Начало getCount -->
<mxCell id="g_start" value="Начало getCount(K, n)" style="rounded=1;arcSize=50;whiteSpace=wrap;html=1;fontFamily=Arial;fontSize=12;strokeColor=#000000;strokeWidth=1.5;fillColor=#ffffff;" vertex="1" parent="1">
<mxGeometry x="50" y="40" width="160" height="40" as="geometry"/>
</mxCell>
<!-- count = 0 -->
<mxCell id="g_init" value="count = 0" style="whiteSpace=wrap;html=1;fontFamily=Arial;fontSize=12;strokeColor=#000000;strokeWidth=1.5;fillColor=#ffffff;" vertex="1" parent="1">
<mxGeometry x="60" y="110" width="140" height="38" as="geometry"/>
</mxCell>
<!-- Цикл getCount -->
<mxCell id="g_loop" value="i от 0 до n - 1" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;fontFamily=Arial;fontSize=12;strokeColor=#000000;strokeWidth=1.5;fillColor=#ffffff;" vertex="1" parent="1">
<mxGeometry x="50" y="176" width="160" height="38" as="geometry"/>
</mxCell>
<!-- Условие K[i] ≠ 0 -->
<mxCell id="g_cond" value="K[i] ≠ 0" style="rhombus;whiteSpace=wrap;html=1;fontFamily=Arial;fontSize=12;strokeColor=#000000;strokeWidth=1.5;fillColor=#ffffff;" vertex="1" parent="1">
<mxGeometry x="60" y="242" width="140" height="56" as="geometry"/>
</mxCell>
<!-- count = count + 1 -->
<mxCell id="g_inc" value="count = count + 1" style="whiteSpace=wrap;html=1;fontFamily=Arial;fontSize=12;strokeColor=#000000;strokeWidth=1.5;fillColor=#ffffff;" vertex="1" parent="1">
<mxGeometry x="60" y="326" width="140" height="38" as="geometry"/>
</mxCell>
<!-- Узел замыкания цикла getCount -->
<mxCell id="g_join" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#000000;strokeColor=#000000;" vertex="1" parent="1">
<mxGeometry x="128" y="392" width="4" height="4" as="geometry"/>
</mxCell>
<!-- Возврат count -->
<mxCell id="g_ret" value="Возврат count" style="whiteSpace=wrap;html=1;fontFamily=Arial;fontSize=12;strokeColor=#000000;strokeWidth=1.5;fillColor=#ffffff;" vertex="1" parent="1">
<mxGeometry x="60" y="424" width="140" height="38" as="geometry"/>
</mxCell>
<!-- Конец getCount -->
<mxCell id="g_end" value="Конец" style="rounded=1;arcSize=50;whiteSpace=wrap;html=1;fontFamily=Arial;fontSize=12;strokeColor=#000000;strokeWidth=1.5;fillColor=#ffffff;" vertex="1" parent="1">
<mxGeometry x="50" y="490" width="160" height="40" as="geometry"/>
</mxCell>
<!-- Связи getCount -->
<mxCell id="ge1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=classic;" edge="1" parent="1" source="g_start" target="g_init"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="ge2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=classic;" edge="1" parent="1" source="g_init" target="g_loop"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="ge3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=classic;" edge="1" parent="1" source="g_loop" target="g_cond"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="ge4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=classic;" edge="1" parent="1" source="g_cond" target="g_inc"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="gl_yes" value="Да" style="text;html=1;align=center;verticalAlign=middle;fontFamily=Arial;fontSize=11;" vertex="1" parent="1"><mxGeometry x="130" y="298" width="30" height="20" as="geometry"/></mxCell>
<mxCell id="ge5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=none;" edge="1" parent="1" source="g_inc" target="g_join"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="ge6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=none;exitX=1;exitY=0.5;entryX=1;entryY=0.5;" edge="1" parent="1" source="g_cond" target="g_join">
<mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="224" y="270"/><mxPoint x="224" y="394"/></Array></mxGeometry>
</mxCell>
<mxCell id="gl_no" value="Нет" style="text;html=1;align=center;verticalAlign=middle;fontFamily=Arial;fontSize=11;" vertex="1" parent="1"><mxGeometry x="198" y="252" width="30" height="20" as="geometry"/></mxCell>
<mxCell id="ge7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=classic;exitX=0.5;exitY=1;entryX=0;entryY=0.5;" edge="1" parent="1" source="g_join" target="g_loop">
<mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="130" y="406"/><mxPoint x="28" y="406"/><mxPoint x="28" y="195"/></Array></mxGeometry>
</mxCell>
<mxCell id="ge8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=classic;exitX=1;exitY=0.5;entryX=1;entryY=0.5;" edge="1" parent="1" source="g_loop" target="g_ret">
<mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="246" y="195"/><mxPoint x="246" y="443"/></Array></mxGeometry>
</mxCell>
<mxCell id="ge9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=classic;" edge="1" parent="1" source="g_ret" target="g_end"><mxGeometry relative="1" as="geometry"/></mxCell>
<!-- ==================== СПРАВА: makeX ==================== -->
<!-- Начало makeX -->
<mxCell id="m_start" value="Начало makeX(K, n, X)" style="rounded=1;arcSize=50;whiteSpace=wrap;html=1;fontFamily=Arial;fontSize=12;strokeColor=#000000;strokeWidth=1.5;fillColor=#ffffff;" vertex="1" parent="1">
<mxGeometry x="390" y="40" width="160" height="40" as="geometry"/>
</mxCell>
<!-- idx = 0 -->
<mxCell id="m_init" value="idx = 0" style="whiteSpace=wrap;html=1;fontFamily=Arial;fontSize=12;strokeColor=#000000;strokeWidth=1.5;fillColor=#ffffff;" vertex="1" parent="1">
<mxGeometry x="400" y="110" width="140" height="38" as="geometry"/>
</mxCell>
<!-- Цикл makeX -->
<mxCell id="m_loop" value="i от 0 до n - 1" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;fontFamily=Arial;fontSize=12;strokeColor=#000000;strokeWidth=1.5;fillColor=#ffffff;" vertex="1" parent="1">
<mxGeometry x="390" y="176" width="160" height="38" as="geometry"/>
</mxCell>
<!-- Условие K[i] ≠ 0 -->
<mxCell id="m_cond" value="K[i] ≠ 0" style="rhombus;whiteSpace=wrap;html=1;fontFamily=Arial;fontSize=12;strokeColor=#000000;strokeWidth=1.5;fillColor=#ffffff;" vertex="1" parent="1">
<mxGeometry x="400" y="242" width="140" height="56" as="geometry"/>
</mxCell>
<!-- X[idx] = K[i], idx = idx + 1 -->
<mxCell id="m_act" value="X[idx] = K[i] idx = idx + 1" style="whiteSpace=wrap;html=1;fontFamily=Arial;fontSize=12;strokeColor=#000000;strokeWidth=1.5;fillColor=#ffffff;" vertex="1" parent="1">
<mxGeometry x="400" y="326" width="140" height="44" as="geometry"/>
</mxCell>
<!-- Узел замыкания цикла makeX -->
<mxCell id="m_join" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#000000;strokeColor=#000000;" vertex="1" parent="1">
<mxGeometry x="468" y="398" width="4" height="4" as="geometry"/>
</mxCell>
<!-- Конец makeX -->
<mxCell id="m_end" value="Конец" style="rounded=1;arcSize=50;whiteSpace=wrap;html=1;fontFamily=Arial;fontSize=12;strokeColor=#000000;strokeWidth=1.5;fillColor=#ffffff;" vertex="1" parent="1">
<mxGeometry x="390" y="440" width="160" height="40" as="geometry"/>
</mxCell>
<!-- Связи makeX -->
<mxCell id="me1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=classic;" edge="1" parent="1" source="m_start" target="m_init"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="me2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=classic;" edge="1" parent="1" source="m_init" target="m_loop"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="me3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=classic;" edge="1" parent="1" source="m_loop" target="m_cond"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="me4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=classic;" edge="1" parent="1" source="m_cond" target="m_act"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="ml_yes" value="Да" style="text;html=1;align=center;verticalAlign=middle;fontFamily=Arial;fontSize=11;" vertex="1" parent="1"><mxGeometry x="470" y="298" width="30" height="20" as="geometry"/></mxCell>
<mxCell id="me5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=none;" edge="1" parent="1" source="m_act" target="m_join"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="me6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=none;exitX=1;exitY=0.5;entryX=1;entryY=0.5;" edge="1" parent="1" source="m_cond" target="m_join">
<mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="564" y="270"/><mxPoint x="564" y="400"/></Array></mxGeometry>
</mxCell>
<mxCell id="ml_no" value="Нет" style="text;html=1;align=center;verticalAlign=middle;fontFamily=Arial;fontSize=11;" vertex="1" parent="1"><mxGeometry x="538" y="252" width="30" height="20" as="geometry"/></mxCell>
<mxCell id="me7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=classic;exitX=0.5;exitY=1;entryX=0;entryY=0.5;" edge="1" parent="1" source="m_join" target="m_loop">
<mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="470" y="412"/><mxPoint x="368" y="412"/><mxPoint x="368" y="195"/></Array></mxGeometry>
</mxCell>
<mxCell id="me8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#000000;strokeWidth=1.5;endArrow=classic;exitX=1;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_loop" target="m_end">
<mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="586" y="195"/><mxPoint x="586" y="424"/><mxPoint x="470" y="424"/></Array></mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>