What is wrong with my solution?

Hello @Ferogle please wait i am checking your code:

Hello @Ferogle what is the logic that you are applying and why you are forming the 3d array?

i used a flag variable to store the max answer when it’s piyush turn and when it’s not i am storing the min.Please look into my previous question’s code i did the same thing but all test cases passes

look into my submission 8911133 where i used same logic for optimal game strategy 1

@Ferogle why you are using 3d array?
there is no need to use 3d array.
you can do this by 2d array as well.