summaryrefslogtreecommitdiff
path: root/cpp/Es5.cpp
diff options
context:
space:
mode:
authorSanto Cariotti <sancn@live.com>2017-04-27 15:26:45 +0200
committerSanto Cariotti <sancn@live.com>2017-04-27 15:26:45 +0200
commit0ac2603ae4c097e9c0e3915d96cc96387f186f19 (patch)
tree090bd09c191ae7249490374aa24351caf80305b6 /cpp/Es5.cpp
parent750b7dc56161470c91caf051add98cad4146bf30 (diff)
Deleted files
Diffstat (limited to 'cpp/Es5.cpp')
-rw-r--r--cpp/Es5.cpp46
1 files changed, 0 insertions, 46 deletions
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 <iostream>
-#define BIANCO 0 //Non Visitato
-#define NERO 2 //Visitato
-#define GRIGIO 1 //Non Finito
-#define INF 999999
-#include <vector>
-#include <fstream>
-#include <queue>
-#define MAXN 9999
-#define INDEF -1
-#include <stack>
-using namespace std;
-typedef pair <int,int> p;
-struct nodo{
- vector<int> adj;
- vector<int> p;
-};
-
-int main(int argc, char** argv) {
- int v,e;
- int sorgente;
- nodo no[v];
-
- priority_queue<p> Q;
- int peso[v];
- Q.push(p(0,sorgente));
-
- while(!Q.empty())
- {
- pair <int,int> a=Q.top();
- Q.pop();
- if (a.first > peso[a.second])
- continue;
-
- for (int i=0;i<no[a.second].adj.size();i++)
- {
- if (peso[no[a.second].adj[i]]>a.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;
-}