-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunc.hpp
More file actions
38 lines (33 loc) · 875 Bytes
/
func.hpp
File metadata and controls
38 lines (33 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <vector>
#include <iostream>
#include <fstream>
using namespace std;
bool not_in(int x, vector<int> n) {
for (int i = 0; i < n.size(); ++i) {
if (x == n.at(i)) {
return false;
}
}
return true;
}
//(7 11 4 23 13 26 1 )
void crear_carpeta() {
string path = "soluciones";
int status = mkdir(path.c_str(), 0777);
if (status == 0) {
cout << "\nDirectorio soluciones creado";
}
}
vector<int> nodos_faltantes(vector<int> nodos, vector<int> v) {
vector<int> faltantes;
for (int i = 0; i < nodos.size(); ++i) {
if (count(v.begin(), v.end(), nodos.at(i)) == 0) {
faltantes.push_back(nodos.at(i));
}
}
//print
//for (int i = 0; i < faltantes.size(); ++i) {
// cout << faltantes.at(i);
//}
return faltantes;
}