300iq's blog

By 300iq, 2 weeks ago, translation, In English,
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
 
 
 
 
  • Vote: I like it  
  • +100
  • Vote: I do not like it  

»
13 days ago, # |
  Vote: I like it +20 Vote: I do not like it

"A fat fish can't dangerously eat a fish with smaller weight. Indeed, even if all the smaller fishes eat each other, the resulting fish would be too small. We can conclude that the danger is not greater k−t." How can you conclude that? All fat fish may as well take part only in fights with bigger eels, case in which the argument you have doesn't imply a "lost fight". They as well might fight with each other (you have around t/2 non-dangerous fights from here, and from then on, there's no argument as to why those newly created eels will not take part only in dangerous fights). Could you give a more formal proof for that observation?

  • »
    »
    13 days ago, # ^ |
      Vote: I like it +18 Vote: I do not like it

    Let's take fat fish, say it is k-th in sorted order. Let's give each fish its mark: it will be 1 for (k - 1)-th fish, 2 for each fish smaller than (k - 1)-th, and 0 for all bigger (including our fat fish). The result of the fight will be fish with mark min(x, y) where x and y are marks of fishes in the fight. In the end we will get fish with mark 0, so it is easy to see that there will be a fight between fishes with marks 0 and 1 at some moment. I claim that this fight is non-dangerous (any fish with mark 0 is more than twice bigger than any possible fish with marks 1 or 2). Also it is not hard to check that these fights are different for all fat fishes.

»
12 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone explain their easy approach for div2 D with example ?

  • »
    »
    12 days ago, # ^ |
    Rev. 4   Vote: I like it 0 Vote: I do not like it

    graph : https://imgur.com/a/Iac4Lm2

    Here we see,that s(1) = 1 ==> a(1) = 1.We can say,that a(3) = s(3) — a(1) and a(4) = s(4) — a(1). But can we reduce the answer?Yes.We can put on vertex 2 min(s(3) — a(1), s(4) — a(1)).And this value will embrace all children of vertex(2).So a(1) = 1, a(2) = 2, a(3) = 0, a(4) = 1. Ans = 4.

    • »
      »
      »
      12 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      how a(4)=s(4)-a(3) ???? cant get this part

      • »
        »
        »
        »
        12 days ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        and also plz explain when will be the answer not possible

»
11 days ago, # |
  Vote: I like it 0 Vote: I do not like it

can someone explain more clearly problem b div 2

»
10 days ago, # |
  Vote: I like it 0 Vote: I do not like it

please provide proof of problem E- Nice Table.

  • »
    »
    8 days ago, # ^ |
      Vote: I like it +16 Vote: I do not like it

    If a row contains three characters, two neighbor rows of each row will be same. If a column contains three characters, two neighbor columns of each column will be same. Thus, in a good matrix, either each row contain at most two different characters, or each column contain at most two different characters.

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

I have implemented code of @Shtef for problem E in a well commented manner, for easy to understand. If someone don't finds original code easier, you may have a look at my version of same for better understanding. link=> https://ideone.com/Ypsk8P .

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

someone pls explain implementation of div 2 F problem, i commented it here but was not able to understand. https://ideone.com/kZAgdk