hit023's blog

By hit023, history, 5 years ago, In English

The problem (link) statement says clearly that the response from the system will be 3rd and the 4th meatiest meatball from the given 5 meatball indices. But in the example given, the 2nd and 3rd meatiest are being returned. What are we expected to do? Any clarification (from people who have solved the problem or otherwise) will be appreciated.

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

| Write comment?
»
5 years ago, # |
  Vote: I like it -8 Vote: I do not like it

you got it wrong, In sample its given order or meatiness is 1<2<3<4<5<6 so among 1,2,3,4,5 obviously 3rd and 4th = (3,4) and among 1,2,4,5,6 3rd and 4th = (4,5). Here a<b means b is more meatier than a.

  • »
    »
    5 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Hi, So in 1 2 3 4 5
    5 is the first meatiest 4 is the second meatiest
    3 is the 3rd meatiest right?..

    Or is 1 the meatiest?

    • »
      »
      »
      5 years ago, # ^ |
        Vote: I like it -8 Vote: I do not like it

      Here higher the rank more the meatiness so 5 is 5th meatiest, follow this anology and everything will make sense

»
5 years ago, # |
  Vote: I like it -8 Vote: I do not like it

can anyone explain the problem https://www.codechef.com/DEC18B/problems/INTXOR ? am not understand the statement of this problem.

  • »
    »
    5 years ago, # ^ |
      Vote: I like it -8 Vote: I do not like it

    There are N hidden numbers lets say a1 a2 ... aN.
    Now you ask some queries in which you will give any 3 index and judge will return xor of numbers at those positions.Ex 1,4,5 then judge will return a1(xor)a4(xor)a5
    Your task is to find all hidden numbers using at most N queries.And some index i should not be appear more than 3 times in your all query.
    For example if you have asked queries like 1 2 3, 1 2 4, 1 2 5, then you cant ask 1 3 5.

»
5 years ago, # |
  Vote: I like it +4 Vote: I do not like it

There is a clear ambiguity in the problem statement and I faced the same issue.
But the correct answer will be achieved when you perceive the statement as 3rd and 2nd meatiest balls(in this order) are being returned as the answer.
You can see more clarifications on this link.