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/Es 3.cpp | 109 ----------------------------------------------------- cpp/Es5.cpp | 46 ---------------------- cpp/Es6.cpp | 38 ------------------- cpp/arrayMinMax.cc | 35 ----------------- cpp/ascensore.cc | 90 ------------------------------------------- 5 files changed, 318 deletions(-) delete mode 100644 cpp/Es 3.cpp delete mode 100644 cpp/Es5.cpp delete mode 100644 cpp/Es6.cpp delete mode 100644 cpp/arrayMinMax.cc delete mode 100644 cpp/ascensore.cc (limited to 'cpp') diff --git a/cpp/Es 3.cpp b/cpp/Es 3.cpp deleted file mode 100644 index d525f62..0000000 --- a/cpp/Es 3.cpp +++ /dev/null @@ -1,109 +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; -std::priority_queue, std::greater

> Q; -int V,E; -int matriceAdj[MAXN][MAXN]; -int T; -struct nodo { - vector adj; - int inizio,fine; -}no[MAXN]; - int colore[MAXN]; - bool Ciclico=false; - bool dfsVisit (int u) - { - cout<>V>>E; - int a,b; - for (int i=0;i>a>>b; - no[a].adj.push_back(b); - } - dfs(); - for (int i=0;i -#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; -} diff --git a/cpp/Es6.cpp b/cpp/Es6.cpp deleted file mode 100644 index 9907eb9..0000000 --- a/cpp/Es6.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -using namespace std; -/* run this program using the console pauser or add your own getch, system("pause") or input loop */ - -int main(int argc, char** argv) { - int v=5; - int matrice[v][v]; - for (int i=0;i - -using namespace std; - -int main(void) -{ - int a[] = {5,14,9,8,10,65,32,1,6,78}; - int tot = sizeof a / sizeof(int); - int t, i, j, minore = a[0], maggiore = a[tot-1]; - - for(i = 0; i < tot; i++) - { - for(j = 0; j < tot-1; j++) - { - if(a[j] > a[j+1]){ - t = a[j+1]; - a[j+1] = a[j]; - a[j] = t; - } - } - } - - //for(i = 0; i < tot; i++) cout << a[i] << endl; - - /*for(int i = 0; i < tot; i++) - { - if(a[i] < minore) minore = a[i]; - else if(a[i] > maggiore) maggiore = a[i]; - }*/ - - cout << minore << endl; - cout << maggiore << endl; - - return 0; -} diff --git a/cpp/ascensore.cc b/cpp/ascensore.cc deleted file mode 100644 index 8e69964..0000000 --- a/cpp/ascensore.cc +++ /dev/null @@ -1,90 +0,0 @@ -#include -#include -#include -#include - -class Ascensore -{ -private: - unsigned short int floor; - bool doors; - unsigned short int maxFloor; -public: - Ascensore(unsigned short int plan = 0) {floor = plan; maxFloor = 5;} - void Up(void); - void Down(void); - void Doors(void); - void getFloor(void); -}; - -void _clear(void); - -using namespace std; - -int main(void) -{ - char choose; - Ascensore *ascensore = new Ascensore(); - do { - ascensore->getFloor(); - cin >> choose; - choose = tolower(choose); - if(choose == 'u' || choose == 'd') ascensore->Doors(); - sleep(2); - switch(choose) - { - case 'u' : ascensore->Up(); break; - case 'd' : ascensore->Down(); break; - case 'e' : break; - } - _clear(); - if(choose == 'u' || choose == 'd') ascensore->Doors(); - } while(choose != 'e'); - - cout << "SEI USCITO DALL'ASCENSORE CON SUCCESSO!"; - - return 0; -} - -void _clear(void) -{ - #ifdef OS_WINDOWS - system("CLS"); - #else - system("clear"); - #endif -} - -void Ascensore::getFloor(void) -{ - if(floor == maxFloor) cout << "Sei arrivato all'ultimo piano" << endl; - if(floor == 0) cout << "Non puoi scendere più di così" << endl; - cout << "SEI ATTUALMENTE AL PIANO " << floor << endl; - cout << "\nQUALE AZIONE SI VUOLE COMPIERE?" << endl; - cout << "U - salire" << endl; - cout << "D - scendere" << endl; - cout << "E - Uscire" << endl; - cout << "> "; -} - -void Ascensore::Up(void) -{ - if(floor < maxFloor) floor+=1; -} - -void Ascensore::Down(void) -{ - if(floor > 0) floor-=1; -} - -void Ascensore::Doors(void) -{ - if(doors == true) - { - cout << "> APERTURA PORTE" << endl; - doors = false; - } else { - cout << "> CHIUSURA PORTE..." << endl; - doors = true; - } -} -- cgit v1.2.3-18-g5258