Sort by

recency

|

106 Discussions

|

  • + 0 comments

    In the first case (n=2, m=2), Player 2 wins since Player 2 can mirror Player 1's moves. In the second case (n=1, m=4), Player 1 wins by reducing the tower height optimally, forcing Player 2 to lose.

  • + 0 comments

    hello guys mai apka apna salil singh

  • + 0 comments

    int towerBreakers(int n, int m) { if((m==1)||(n%2==0)) return 2; else return 1;

    }

  • + 0 comments

    Why don't you try https://avatarworldmodapk.pro

  • + 2 comments

    The way I see it, the second test case is wrong. 1 tower of 7 pieces. If players do the optimal play, the game would go like this:

    • Player 1 takes 1, tower size = 6;
    • Player 2 takes 3, tower size = 3;
    • Player 1 takes 1, tower size = 2;
    • Player 2 takes 1, tower size = 1; Player 1 has no move, Player 2 wins return 2

    Same with the second one. 3 tower of 7 pieces. Player 2 forces P1 to take the first piece from each tower and Player 2 will win.