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

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

We invite you to participate in CodeChef’s Starters125, aka International Coding Marathon, in collaboration with Technex'24, IIT (BHU), this Wednesday, 13th March, rated for till 6-Stars(ie. for users with rating < 2500).

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

Joining us on the problem setting panel are:

Special Thanks to Vaibhav kingmessi Khater, Nachiketa Atekichan Sharma and Anshiv sv1shan Singla for their valuable feedback.

ICM is the flagship CP event of Byte the Bits, the set of programming events organized under Technex, the annual techno-management fest of the Indian Institute of Technology (BHU), Varanasi.

ICM

Prizes

Note: Prizes are only for Indian College participants (for division 1 only).

  • Winner: $$$20,000$$$ INR

  • $$$1^{st}$$$ runner up: $$$15,000$$$ INR

  • $$$2^{nd}$$$ runner up: $$$10,000$$$ INR

  • Rank $$$4^{th}$$$ to $$$8^{th}$$$: $$$1,000$$$ INR

Please fill out this form to avail them.

Some of out previous rounds:

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!

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

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

As a valuable feedbacker, I assure that I was forced to comment on this blog.

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

Mr_Misogynist orz

I salute your noble spirit.

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

Will division 2 participants(Indian College students) not be eligible for the prizes ?

»
8 месяцев назад, # |
Rev. 2   Проголосовать: нравится -9 Проголосовать: не нравится

Will Indian high school students(division 1) be eligible for the prizes?

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

As a Setter,I assure you that I don't know any problem.

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

Reminder

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

is div2 rank 1 is not counted in price?

»
8 месяцев назад, # |
Rev. 2   Проголосовать: нравится +16 Проголосовать: не нравится

The tests for the problem ATBO seems weak. For example,
1
6
1 2 3 4 5 6
15 -5 -4 -3 -2 20
should give YES as output, but most of the submissions giving NO are accepted as well.
My accepted submission which gives YES as output.
The logic behind my submission is that given numbers a, b, c, d, e, f we can change the sequence to abcde, -e, -d, -c, -b, bcdef after applying a few operations. The same pattern can be continued when the sequence is longer.
For example, this accepted submission gives NO for this testcase.
Please rejudge this problem @ satyam343

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

    Can you please explain your solution and how you came up with it ?

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

    if that is the case, then it is unfair for all since they skipped that problem by seeing accepted Better option is ig remove that problem contribution from ranking

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

      I agree.

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

        It will be unfair,better option is ignore this.It was not intentional,just move on.

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

      Agree, although I solved this problem if it has this many weak test cases it's better to have a fair judgment by removing such a problem.

      One more counter case

      we can achieve a sequence $$${(a_1 + a_2 + a_3 + a_4, a_2, a_3, a_4, a_5)}$$$ from $$${(a_1, a_2, a_3, a_4, a_5)}$$$

      Proof of the above

      My ACed Submission will fail on this!

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

    Disclaimer 1: I solved it in the intended way.

    Disclaimer 2: the contest is not rated for me.

    There's an established policy on codechef that a rejudge (i) only happens if the test cases were wrong, not weak, and (ii) cannot change AC to non-AC.

    It makes a lot more sense than any other resolution proposed here. It is unfortunate, but the best course of action in this case is to do nothing and hopefully learn from this mistake so that it doesn't happen again.

    Fortunately, codechef rating system is very forgiving, so one such contest will not influence your rating significantly. Those who got AC with a wrong solution will likely lose some rating in the next contest, and those who spent extra time getting the correct solution will gain some rating in the next contest.

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

Video Editorial for div2. B(Minimal Binary)

YOUTUBE EDITORIAL LINK : --Click Here

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

Here's a very simple way to naturally arrive at the solution to "Bucket Game" from today's Starter, the reasoning of which you can also reuse in future Game theory problems.

There exists a concept of mirroring which is useful in these problems. Moves can be mirrored if the number of entities in the game is even (whether or not mirroring is useful depends on the particular problem, but you should think about mirroring at least once, and then discard it if it's not relevant).

If you have a single pile, then you can keep mirroring your opponent's move to win that pile. Winning is only possible if the number of elements in the pile are even. Even if you have infinite piles with even number of stones, you can just mirror the moves on the pile that the opponent chose. Hence, the first player on a set of even piles will lose each pile. Therefore, it is never optimal for the first player to pick an even pile, unless no option's remaining. Hence, let's keep all the even piles in one area. And all the odd piles in another area. It's obvious that no one will touch the even pile until the very end.

The first player will of course make a move on the odd pile, which would then become even, and it would be shifted to the even section. After which, no one will use them till the very end. The second player will also do the same, i.e, pick an odd pile.

So, each player will keep alternating between odd, odd, odd, odd, etc. Notice that there's no strategy involved for the remaining even piles, i.e, the player who gets those remaining even piles is already decided based on the alternate sequence above. So if you can't control who gets to walk away with the big chunk of even pile, what is the next best thing that you could do? Of course, you should greedily maximize your score, by taking a pile with 1 immediately (the opponent would do the same).

Hence, you can just simulate the entire process. Sort the array so that the pile with 1 stones are at the front. Then, in each move, each person will greedily take the available 1, once the 1s are consumed, the game is fixed, i.e, everyone has to blindly select one odd pile untill none remain, and one person takes the chunk of even piles accumulated.

Code

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

Please look into re-evaluation of the question "Operating on A" with strong test cases @satyam343 The problem is accepting wrong logic solutions due to weak test cases. It is unfair for a ratest contest to ignore such misjudgements. A possible test case is: 1 6 2 1 -3 4 2 3 6 -3 -1 2 -4 9

Correct answer is YES as we can apply operation on i=4 and then on i=2, but many solutions with output NO are getting accepted.

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