F - x = a^b (AtCoder Beginner Contest 361)

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • Code: atcoder.jp/con...
    #atcoder #codechef #codeforces #arc #cp #abc #Atcoder

Комментарии • 5

  • @kashishchawla2754
    @kashishchawla2754 2 месяца назад

    thanks

  • @kashishchawla2754
    @kashishchawla2754 2 месяца назад

    d problem?

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051  2 месяца назад

      D is kind of a simple breadth-first search, so have not covered it, you can check my solution atcoder.jp/contests/abc361/submissions/55280719 and ask me if there is any doubt

    • @kashishchawla2754
      @kashishchawla2754 2 месяца назад

      @@soumyabhattacharjee1051 understood the approach, how can we be sure about the tc, can u pls elborate

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051  2 месяца назад

      @@kashishchawla2754 The total number of states are at max O(N2^N) N for choosing the i where i and i+1 are spaces and 2^N for combinations of other. Now for each space the rearrangement is O(N) so overall complexity should not be more than O(N^2*2^N)
      Please like and subscribe if it is helpful