Alice Bob continue game stone there row n stone stone associate value you give integer array stone stonesi value ith stoneAlice Bob turn Alice start on turn player remove stone stone the player remove stone lose sum value remove stone divisible 3 Bob win automatically remain stone Alices turnassuming player play optimally return true Alice win false Bob win Example 1input stone 21output trueexplanation the game play follow turn 1 Alice remove stone turn 2 Bob remove remain stone the sum remove stone 1 2 3 divisible 3 therefore Bob lose Alice win gameexample 2input stone 2output falseexplanation Alice remove stone sum value remove stone 2 since stone remove sum value divisible 3 Bob win gameexample 3input stone 51243output falseexplanation Bob win one possible way Bob win show turn 1 Alice remove second stone value 1 Sum remove stone 1 turn 2 Bob remove fifth stone value 3 Sum remove stone 1 3 4 turn 3 alice remove fourth stone value 4 Sum remove stone 1 3 4 8 turn 4 Bob remove stone value 2 Sum remove stone 1 3 4 2 10 turn 5 Alice remove stone value 5 Sum remove stone 1 3 4 2 5 15alice lose game sum remove stone 15 divisible 3 Bob win game Constraints1 stoneslength 1051 stonesi 104