-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauxiliar.cpp
More file actions
40 lines (28 loc) · 777 Bytes
/
Copy pathauxiliar.cpp
File metadata and controls
40 lines (28 loc) · 777 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
39
#include <bits/stdc++.h>
using namespace std;
#include "global.h"
void printYard(vector<vector<int>> &yard){
int bay = 0;
for(int i = 0; i < n_bays*n_rows; i++){
//Verificamos si cambiamos de bahía
if(i%n_rows == 0){
cout << "\nBay " << bay << "\n";
bay++;
}
//Mostramos el stack actual
int size = yard[i].size();
for(int j = 0; j < size; j++){
cout << yard[i][j] << " ";
}
cout << "\n";
}
}
void printInd(individuo &ind){
for (int i = 0; i < ind.moves.size(); i++){
printf("%d ", ind.moves[i]);
}
printf("\nF[0]= %d ", ind.fobj[0]);
}
bool desc_sort(pair<int, int>& a, pair<int, int>& b) {
return a.first > b.first;
}