Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 1.25 KB

README.md

File metadata and controls

61 lines (45 loc) · 1.25 KB

Hash Code 2020

see https://hashcodejudge.withgoogle.com/#/home

Problem statement

Problem statement lives here

Inputs

Input files given with the problem statement live here

JavaScript

$ cd js
$ node index.js

C++

Build

CMake version 3.0 minimum is required to build.

$ cd cpp
$ mkdir Build
$ cd Build
$ cmake ..
$ make

Run

Read problem from standard input

$ cd cpp/Build
$ cat ../../inputs/a_example.in | ./hascode-2020-pizza shuffle

Read from input files

$ cd cpp/Build
$ ./hascode-2020-pizza \
    shuffle \
    ../../inputs/a_example.in \
    ../../inputs/b_small.in

You can customize the maximum number of iterations with the environment variable PIZZA_MAX_ITERATION. For example:

$ PIZZA_MAX_ITERATION=1000000 ./hascode-2020-pizza  shuffle inputs/d_quite_bug.in

Will use 1000000 shuffle rounds to find the best solution.

Implement a solver

  • Put your solver implementation in the cpp/solvers folders.
  • Your solver must be convertible to a Solver a.k.a std::function<PizzaSolution(const PizzaProblem &, const SolverOptions &)> (see pizza.hpp),
  • Edit CMakeLists.txt to add your solver implementation to the SOLVERS list.