JainWinn's blog

By JainWinn, 3 months ago, In English

Hello, Codeforces!

I, _bLIC_ and 0x4F5F6F have curated a Solo Practice Contest in the gym, Coding Challenge Alpha VII - by Algorave. It's been one year of AlgoRave and we would like to name the contest as Algoversary. The level of questions is medium. This is for anyone who loves giving contests and solving problems. This contest will be of most interest upto Expert rated coders, but I would also like to invite Div. 1 coders to participate as well. For anyone who wants to practice or just wants to go through the problems can register for our contest here. Hope you will enjoy solving the problems!

I would like to thank:

Contest Details:

We hope that this contest, regardless of your background, rating and result, will increase your exposure to competitive programming and make you better than you were yesterday. Have fun!

Note: You can also register for the contest while it is going on. You may want to check out our group for past contests.

Spoiler

UPD1: The registration has started!

UPD2: Congratulations to the winning contestants!

  1. sojabhai
  2. liympanda
  3. dhruv-.-pasricha
  4. anfanite396
  5. _greedy
  6. sword060
  7. Zeaqle

Congratulations to first solves as well!

  • Vote: I like it
  • +39
  • Vote: I do not like it

»
3 months ago, # |
  Vote: I like it +7 Vote: I do not like it

excited

»
3 months ago, # |
  Vote: I like it +7 Vote: I do not like it
»
3 months ago, # |
  Vote: I like it +12 Vote: I do not like it

As a problem setter, I highly recommend participating in this contest.

»
3 months ago, # |
  Vote: I like it +4 Vote: I do not like it
»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

For Problem F : Thought of going with the contribution of ith as ending of the subarray let for i, we need to find the answer let k be the smaller element before it at [i1 i2 i3 ... ik ] i Then Contribution of i is : i1 + i2 + i3 + .. ik + i + k+1 To find for each i , sum of indices of numbers that are smaller than it in prefix option1 : segtree option2 : wavelet tree One is Giving TLE and other is MLE

What will be the intended solution then

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I used Fenwick Tree for the range updates, which works under the time and memory constraints.

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Ohh means basically just fenwick segment tree issue Than Fine

      Thanks

      • »
        »
        »
        »
        3 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Nah, i tried it with segtree and it ran in 983ms. You are probably doing something wrong

        • »
          »
          »
          »
          »
          3 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Doing range update with lazy propagation and point query

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

is there an editorial ?

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I'll place a comment here so I can comeback later