Блог пользователя Dominater069

Автор Dominater069, 19 месяцев назад, По-английски

We invite you to participate in CodeChef’s Starters 158, this Wednesday, 30th October, rated upto 6 stars (i.e. for users with rating < 2500)

Time: 8:00 PM — 10:00 PM IST

Joining us on the problem setting panel are:

Written editorials will be available for all on discuss.codechef.com. Pro users can find the editorials directly on the problem pages after the contest. The video editorials of the problems will be available only to Pro users.

Also, if you have some original and engaging problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here. Hope to see you participating.

Good Luck!

UPD 1: The following is the number of problems:

  • Div1 : 5 problems + 1 subtask
  • Div2 : 7 problems
  • Div3 : 7 problems
  • Div4 : 8 problems

UPD 2: The contest got changed to rated upto 6 stars. I am sorry for the late change. We decided it was hard enough for 6 stars.

UPD 3 : Congratulations to Top 5!

  • Проголосовать: нравится
  • +71
  • Проголосовать: не нравится

»
19 месяцев назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

OMG , TheScrasse Round !

»
19 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

again no 6 stars rated :( .

»
19 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

am i the one who choose which div i do ? or iam auto. assigned according to my rate?

»
19 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Was logic for MAKETREE to find out minimum possible colours we can use for bipartite edge colourings for the given tree ?

»
19 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can someone plz explain the other approach discussed in editorial of multiply 2 to minimise .

particularly this :

There are other approaches too. For instance, one way is to also allow for “reversing” the process, meaning we can break a copy of $$$2x$$$ into two copies of $$$x$$$ (which doesn’t make the answer any worse). Repeatedly perform this reverse operation till every number in the array is odd. Then, for an odd number that appears $$$k$$$ times, simulating the forward process should show you that the number of distinct values you end up with is exactly $$$\text{popcount}(k)$$$, that is, the number of bits set in $$$k$$$.

Editorial link

  • »
    »
    19 месяцев назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится 0 Проголосовать: не нравится

    it say's that suppose for a time you have an array $$$A$$$ which consists of only odd numbers
    suppose frequency of particular odd number in array $$$A$$$ is $$$k$$$ so we separate these similar odd number in $$$popcount(k)$$$ blocks such that size of each block is in powers of $$$2$$$
    so if you apply operation only in one block repeatedly you will end up having only only element in that block

    for example $$$A$$$ = {1,3,3,3,3,3,3,5}
    so there are $$$6$$$ $$$3s$$$, we will divide them in blocks of size $$$2$$$ and $$$4$$$
    {3,3}, {3,3,3,3}
    now if you consider applying operation in each block separately you will end up having
    {6}, {12} = {6, 12} so at the end you have $$$2$$$ distinct elements as no. of set bits in $$$6$$$.