-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.txt
21 lines (15 loc) · 839 Bytes
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Solution Problem 1
For the people to not interact, the people in the group should only eat one cupcake and if
sent back into the labrynth dont eat and come back
The leader of the group (person 0) will be the only person who will replace the cupcake
this will make it so that he can count how many people ate the cupcake.
When the leader counts n replaces, all the people in the group ate, will tell the minoutaur.
Problem 2
1. This is a bad idea beacue this will create a bottleneck in front of the door.
2. This is a good not the greatest solution, the people can know when to get in, will be people rushing to get
in when it becomes available.
3. This is the best idea as the people who want to get in gets queued to get into the room.
How to run.
javac Main.java
java Main
this will run problem 1 first then problem 2 after it.