xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 3KB
    文件類型: .7z
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-05-23
  • 語言: C/C++
  • 標(biāo)簽: C#??所有路徑??無向圖??

資源簡(jiǎn)介

求解無向圖中任意兩點(diǎn)之間的所有路徑的C#實(shí)現(xiàn) 本文檔只是根據(jù)網(wǎng)上搜到的資料,翻譯成C#版本。當(dāng)初為了項(xiàng)目需要,在網(wǎng)上找了很長(zhǎng)時(shí)間,另外 自己也曾經(jīng)廢了老牛鼻子勁,也沒有看懂網(wǎng)上的一些C++版本的算法實(shí)現(xiàn)。所以我上傳上這個(gè)文件, 只希望急需的朋友們用,本人在此希望算法的原實(shí)現(xiàn)作者不要怪罪。

資源截圖

代碼片段和文件信息

using?System;
using?System.Data;
using?System.Configuration;
using?System.Web;
using?System.Web.Security;
using?System.Web.UI;
using?System.Web.UI.WebControls;
using?System.Web.UI.WebControls.WebParts;
using?System.Web.UI.HtmlControls;
using?System.Collections;

public?partial?class?_Default?:?System.Web.UI.Page?
{
????protected?void?Page_Load(object?sender?EventArgs?e)
????{
????????int[]?graph?=?new?int[5?5];
????????graph?=?InitArray(graph?5);
????????ArrayList?paths?=?(new?MapPath(5)).ShowAllWays(graph?3?2);
????????foreach?(object?obj?in?paths)
????????{
????????????Response.Write(obj.ToString()+““);
????????}
????}
????private?static?int[]?InitArray(int[]?graph?int?vexNum)
????{
????????for?(int?i?=?0;?i?????????{
????????????for?(int?j?=?0;?j?????????????{
????????????????graph[i?j]?=?0;
????????????}
????????}
????????graph[0?1]?=?1;
????????graph[0?3]?=?1;
????????graph[0?4]?=?1;

????????graph[1?0]?=?1;
????????graph[1?2]?=?1;
????????graph[1?3]?=?1;

????????graph[2?1]?=?1;

????????graph[3?0]?=?1;
????????graph[3?1]?=?1;
????????graph[3?4]?=?1;

????????graph[4?0]?=?1;
????????graph[4?3]?=?1;
????????return?graph;
????}

}

評(píng)論

共有 條評(píng)論