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

Автор hit023, история, 6 лет назад, По-английски

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.

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

»
6 лет назад, # |
  Проголосовать: нравится -8 Проголосовать: не нравится

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.

»
6 лет назад, # |
  Проголосовать: нравится -8 Проголосовать: не нравится

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

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится -8 Проголосовать: не нравится

    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.

»
6 лет назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

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.