With this algorithm we're ranked 56th out of about 30 000 teams from all over Europe:) The final score is 49,275,031.
Oleh Rybalchenko
Olexandr Yarushevskyi
Algorithm runner requires the only parameter - problem name. To run, say, b_should_be_easy:
python3 alg_runner.py --file b_should_be_easy
All input files should be in input
dir, format - <problem name>.in
.
Results will be placed in output
dir, format - <problem name>.out
,
rewriting old files with the same names.
Data file parser that transforms input to objects defined in entities To get parsed data, run:
reader = VehicleAssignmentReader('input/{}.in'.format(file))
data = reader.process()
Algorithm class that receives input once and then store its state
while solving. Greedy algorithm instance contains both full problem's
data and operations required to solve it.
Method run
controls the solving flow.
g = Greedy(data.header, data.rides)
g.run()
g.output("output/{}.out".format(file))
Prototypes of involved objects, operations definition