Notes
This function is in beta test. Please help improve it in the issues
here.
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 12 out of bounds for length 12 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) at java.base/java.util.Objects.checkIndex(Objects.java:372) at java.base/java.util.ArrayList.get(ArrayList.java:459) at com.ve472.l1.Hall.arrangeSeat(Hall.java:78) at com.ve472.l1.Cinema.answerQuery(Cinema.java:84) at com.ve472.l1.Cinema.answerQueries(Cinema.java:70) at com.ve472.l1.Main.main(Main.java:34)
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
Eleanore Betzner,The Wandering Earth,apple,8,6
JOJ Answer
Eleanore Betzner,The Wandering Earth,apple,8,6 Myung Colatruglio,The Wandering Earth,apple,7,5,6,7,8 Nichole Pomplun,The Wandering Earth,apple,6,1,2,3,4,5,6,7,8,9,10,11 Jina Mantelli,The Wandering Earth,apple,5,2,3,4,5,6,7,8,9,10 Fernando Sanderfur,The Wandering Earth,apple,8,7,8,9,10 Elyse Smolski,The Wandering Earth,apple,4,2,3,4,5,6,7,8,9,10 Luther Vanhise,The Wandering Earth,apple,3,2,3,4,5,6,7,8,9,10 Brent Mcgillivray,The Wandering Earth,apple,8,3,4,5 Tawnya Shur,The Wandering Earth,apple,7,1,2,3,4 Blondell Woolever,The Wandering Earth,apple,7,9,10,11,12 Emma Liberati,The Wandering Earth,apple,2,1,2,3,4,5,6,7,8,9,10,11,12 Scottie Magsayo,The Wandering Earth,apple,1,5,6,7,8 Kirsten Sherrard,The Wandering Earth,apple,1,2,3,4 Essie Glaves,The Wandering Earth,apple,1,9,10,11 Jacinda Bigony,The Wandering Earth,orange,7,3,4,5,6,7,8,9 Annemarie Treine,The Wandering Earth,orange,6,2,3,4,5,6,7,8,9 Annalisa Bottenfield,The Wandering Earth,orange,5,3,4,5,6,7,8 Janey Mcnelis,The Wandering Earth,orange,4,2,3,4,5,6,7,