From b188061dd0c1fd53e4d5292d33d9eda6dda84027 Mon Sep 17 00:00:00 2001 From: bala <13452927+rfgsdhshgfh@user.noreply.gitee.com> Date: Sat, 13 Jan 2024 15:55:07 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B1=82=E8=A7=A3=E5=BB=BA=E5=85=AC=E8=B7=AF?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: bala <13452927+rfgsdhshgfh@user.noreply.gitee.com> --- ...4\350\267\257\351\227\256\351\242\230.cpp" | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 "2224020152/\347\254\254\345\205\253\345\215\225\345\205\203/\346\261\202\350\247\243\345\273\272\345\205\254\350\267\257\351\227\256\351\242\230.cpp" diff --git "a/2224020152/\347\254\254\345\205\253\345\215\225\345\205\203/\346\261\202\350\247\243\345\273\272\345\205\254\350\267\257\351\227\256\351\242\230.cpp" "b/2224020152/\347\254\254\345\205\253\345\215\225\345\205\203/\346\261\202\350\247\243\345\273\272\345\205\254\350\267\257\351\227\256\351\242\230.cpp" new file mode 100644 index 00000000..e37a6b32 --- /dev/null +++ "b/2224020152/\347\254\254\345\205\253\345\215\225\345\205\203/\346\261\202\350\247\243\345\273\272\345\205\254\350\267\257\351\227\256\351\242\230.cpp" @@ -0,0 +1,60 @@ +#include +#define INF 1e7 +int map[105][105]; +void Prim(int m,int c) +{ + int dist[m+1]; + int flag[m+1]; + for(int i=1;i<=m;i++){ + dist[i]=INF; + flag[i]=0; + if(map[1][i]h)){ + map[v1][v2]=h; + map[v2][v1]=h; + } + + } + Prim(m,c); + } +} -- Gitee