wuhudsm's blog

By wuhudsm, history, 3 weeks ago, In English

Hello, Codeforces!

We are happy to invite you to TheForces Round #33 (Wow-Forces), which will take place on Aug/12/2024 17:35 (Moscow time)

What is TheForces Round?

You will have 135 minutes to solve 6 problems.

The round is TheForces rated! After the round you can find your rating changes here.

Prizes: the participant in the $$$i$$$th place will receive $$$2^{3-i}$$$ dollars $$$(1 \leq i \leq 3)$$$ as a prize. In addition, we will randomly select $$$\lfloor \frac{p}{30} \rfloor$$$ lucky participants and give each of them $$$1$$$ dollar as a prize, where $$$p$$$ is the number of participants. Please actively participate :)

For more details about TheForces Prize, read the above spoiler and join TheForces!

Discord Server (2200+ members)

TheForces website

Contests' archive

UPD:

Editorial

Congrats for the winners!

1 tiger2005, ORZ for the only AK!

2 turkhuu622

3 pandaforever

And $$$2$$$ lucky participants:

skushneryuk

Joy_saha_

(Pls dm wuhudsm for your prize : ) )

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

»
3 weeks ago, # |
Rev. 2   Vote: I like it +7 Vote: I do not like it

As a tester, I want contribution.

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

will this contest will pop up in my contest tab? or I need to go to this blog?

»
3 weeks ago, # |
  Vote: I like it +14 Vote: I do not like it

As a tester, I am sad that I can't participate

»
3 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

As a tester, i'm still thinking what to write

»
3 weeks ago, # |
  Vote: I like it +9 Vote: I do not like it

Hope you will find the problemset as a set of $$$6$$$ problems.

»
3 weeks ago, # |
  Vote: I like it -8 Vote: I do not like it

Wow the cheaters are back XD

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

Registration is open

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Deleted

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

Reminder: contest starts in $$$15$$$ minutes

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

Can anyone help me in B?

Code

I was trying to negate the max element everytime and was updating the rest of the element with respect to that was my approach was wrong or Impelementation? Any insights.

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

    I use binary search, I overkill the max then transfer usage of A to B for any elements that > 0

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

      What do you mean by tranfer the usage of A to B? Ig i was trying to do the same.

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

        in 1 move you can: - c[i] = c[i]-a the rest: c[j]-b

        greedy way: get max c[i] = c[i]-a*res, the rest is c[j] = c[j]-b*res

        transfer -a from max to others c[j] > 0: c[i] = c[i] + a-b, c[j] = c[j] -a+b

        A result "median" is correct if everything in the array is <= 0

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

          Though I cant view the subsmission, thanks anyways, ill try to implement.

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

too slow of solving problems, maybe I overkill A and B...