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

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

We invite you to participate in CodeChef’s Starters 157, this Wednesday, 23th October, rated upto 5 stars (i.e. for users with rating < 2200).

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

Joining us on the problem setting panel are:

Problem distribution:

  • Division $$$1$$$: $$$5$$$ problems
  • Division $$$2$$$: $$$6$$$ problems
  • Division $$$3$$$: $$$7$$$ problems, of which $$$1$$$ is a subtask
  • Division $$$4$$$: $$$8$$$ problems, of which $$$1$$$ is a subtask

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!


Congrats to the top 5 in Div1!

  1. Egor
  2. maspy
  3. Kude
  4. liympanda
  5. noya2
  • Проголосовать: нравится
  • +55
  • Проголосовать: не нравится

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

Please mention the total number of problems division wise, like Dominater069 mentions in his blogs about codechef contest?

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

Reminder: Contest starts in 30 minutes

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

in normal is good. How to calculate the number of subarrays such that the frequency of 1 equals the frequency of 3 and there exists at least 2 in the subarray. I spent the entire contest trying to implement it but I wasn't able to.

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

Seriously I don 't see any reason why constraint on MEDIANT is so small like $$$N\le5000$$$ I mean seriously? There was clearly an easy $$$O(N)$$$ solution , I don't even know how a $$$O(N^2)$$$ solution would look like. Why such unnecessary small constraints??It nothing but created confusion

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

    I did it with an O(n^2) maybe he considered safeguarding idiots like me

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

    how would you check if solution is correct or not in $$$O(n)$$$.

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

      main observation is that if the minimum number is present after the last index of the maximum number then impossible

      if possible then no matter what subarrays you choose for operation you will find a sorted array in the end

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

        i know the solution
        i'm trying to say that constraints are lowered so that CHECKER can run in $$$O(N^2)$$$ or may be something better, but surely not in $$$O(n)$$$.

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

          oh yeah you also have a point , if checker can't check in $$$O(N)$$$ then constraints have to be lowered for sure but again then it questions the fact whether the problem should exist at the first place.Because if a contestant has a straight-forward solution for larger constraints but checker can't afford that then it's not a proper problem to appear.You may ask why?Because as a contestant , when he approaches a problem constraints mean something to him , he can't think from a problem setter's viewpoint that constraints might have been lowered because of not being able to make a checker

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

            as a problemsetter I am telling you none of your sentences make sense

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

            I saw a problem. Due to my own reasons, i assumed it was dp. I failed to solve it. The editorial was greedy.

            Such a bad problem smh. Why didn't problemsetter tell me it is solved with greedy?

            Whether you think this problem is fine or not is a separate issue, but your argument is completely invalid. Constraints exist not to tell you that do this in O(N) but to deny solutions that run in O(N^3) for example. It is not to mislead you to a solution, rather to not give hints. If you do try to infer stuff from constraints, do it at your own risk

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

      Edit: Sorry my approach had flaws, we can't keep doing both identification of median and modification of array in logarithmic time complexity.

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

Video Editorial for A-D with detailed explanation

D WAS really an amazing Problem

Link : YOUTUBE LINK --Click here