From 0ac2603ae4c097e9c0e3915d96cc96387f186f19 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Thu, 27 Apr 2017 15:26:45 +0200 Subject: Deleted files --- cpp/Es5.cpp | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 cpp/Es5.cpp (limited to 'cpp/Es5.cpp') diff --git a/cpp/Es5.cpp b/cpp/Es5.cpp deleted file mode 100644 index 8f6fb48..0000000 --- a/cpp/Es5.cpp +++ /dev/null @@ -1,46 +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; -struct nodo{ - vector adj; - vector p; -}; - -int main(int argc, char** argv) { - int v,e; - int sorgente; - nodo no[v]; - - priority_queue

Q; - int peso[v]; - Q.push(p(0,sorgente)); - - while(!Q.empty()) - { - pair a=Q.top(); - Q.pop(); - if (a.first > peso[a.second]) - continue; - - for (int i=0;ia.first+ no[a.second].p[i]) - { - peso[no[a.second].adj[i]]=a.first + no[a.second].p[i]; - Q.push(p(peso[no[a.second].adj[i]],no[a.second].adj[i])); - } - } - - } - return 0; -} -- cgit v1.2.3-18-g5258