30 lines
475 B
C++
30 lines
475 B
C++
#include <iostream>
|
|
#include <vector>
|
|
|
|
#include "sa.hpp"
|
|
|
|
#ifndef TEMP
|
|
#define TEMP 1000
|
|
#endif
|
|
|
|
#ifndef ALPHA
|
|
#define ALPHA 0.9999
|
|
#endif
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
int number_of_items = 0;
|
|
int capacity = 0;
|
|
std::cin >> number_of_items >> capacity;
|
|
|
|
std::vector<long long> items(number_of_items);
|
|
for (auto &i : items) {
|
|
std::cin >> i;
|
|
}
|
|
|
|
sa::solution act = sa::solution::simulated_annealing(capacity, items,
|
|
TEMP, ALPHA);
|
|
|
|
act.print_sol();
|
|
}
|