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

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ต.ค. 2024

ความคิดเห็น • 5

  • @kashishchawla2754
    @kashishchawla2754 3 หลายเดือนก่อน

    thanks

  • @kashishchawla2754
    @kashishchawla2754 3 หลายเดือนก่อน

    d problem?

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051  3 หลายเดือนก่อน

      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 3 หลายเดือนก่อน

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

    • @soumyabhattacharjee1051
      @soumyabhattacharjee1051  3 หลายเดือนก่อน

      @@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