From 52de06bfdb6499e3cc166fd4a9e54aa953f2fe12 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Thu, 27 Apr 2017 15:32:49 +0200 Subject: Deleted es4 --- cpp/es4.cpp | 67 ------------------------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 cpp/es4.cpp (limited to 'cpp/es4.cpp') diff --git a/cpp/es4.cpp b/cpp/es4.cpp deleted file mode 100644 index a1f1716..0000000 --- a/cpp/es4.cpp +++ /dev/null @@ -1,67 +0,0 @@ -#include -#define BIANCO 0 //Non Visitato -#define NERO 2 //Visitato -#define GRIGIO 1 //Non Finito -#define INF 999999 -#include -#include -#include -#define MAXN 9999 -#define INDEF -1 -#include -using namespace std; -typedef pair p; -int V,E; - -struct nodo { - vector

adj; - int dist; - nodo(){ - dist=INF; - } -}no[MAXN]; - int colore[MAXN]; - void relax (nodo no[], int u, int z) - { - p v= no[u].adj[z]; - if (no[v.first].dist> no[u].dist + v.second ) - { - no[v.first].dist= no[u].dist + v.second; - } - } - - void bf (nodo no[],int n, int s) - { - int i,j,z; - no[0].dist=0; - for (i=0;i>V>>E; - int a,b,c; - for (int i=0;i>a>>b>>c; - no[a].adj.push_back(p(b,c)); - } - bf(no,V,0); //Adiacenze, numeri di vertici, sorgente - for (int i=0;i