Closed avborup closed 1 year ago
Ideas for extensions:
Some very simple input/output
Input:
1 9 10
...###...
Answer: 7
Input:
2 9 20
...###...
....#....
Answer: 19
Input:
3 6 3
######
######
######
Answer: 0
input:
3 6 3
......
......
......
Answer: 3
Input:
3 3 3
#.#
#.#
.#.
Answer: 2
Input:
3 3 3
.#.
.#.
.#.
Answer: 2
Input:
3 3 3
#..
.#.
..#
Answer: 2
Input:
3 3 3
..#
.#.
#..
Answer: 2
To catch solutions that scale with the number of possible entry points or exit points. Hidden cases with huge inputs, that look something like the cases below:
Input:
5 9 5
#.#.#.#.#
.###.###.
..#.#.#..
...###...
....#....
Answer: 4
Input:
5 9 5
....#....
...###...
..#.#.#..
.###.###.
#.#.#.#.#
Answer: 4
Input:
5 9 5
#.#.#.#.#
.###.###.
..#.#.#..
.###.###.
#.#.#.#.#
Answer: 2
Feedback from TA
Input Use the 0,1,2 beers idea for crowdmembers and have every bandmember weigh 1 Might need something else than the grid, so IO does not take too long. We need input large enough that the optimal flow algorithm is the only solution that can give full points, the problem should not be solvable just using greedy
Some options for grading groups Input size Carrying capacity of crowd (all 0, all mixed) Complexity of hand-over (always moving away form stage or mix) Number of band members (1 or many)
Look at running times for the different flow algorithms and chose the one optimal for our input
This issue outlines our initial, basic version of the problem.
Description
A band is performing at this year's Copenhell, and to finish off their concert in style, they would like to crowdsurf from the stage all the way from the stage to the back of the crowd.
However, the band is not sure that the crowd will be able to carry all of them through. They're unsure how strong the people in the crowd are, so to be sure, each person in the crowd would have to carry at most one band member over the course of the crowdsurfing.
The people in the crowd will only pass band members to other crowd members behind them - that is, people further away from the scene than themselves.
Input
#
or if nobody is there to carry.
.Output
The number of band members not able to crowdsurf. I.e. how many band members remain standing on the stage.
Expected output for above input is 1. Two band members can surf the two rightmost paths. The remaining band member has nowhere to surf.
Intended solution
Number of node-disjoint paths, calculated using a maximum flow algorithm.