When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

zemen's blog

By zemen, history, 7 years ago, In English

Hi Everyone,

I would like to invite you all to participate in the HackerEarth's Annual Programming Contest (IndiaHacks 2017). It is an individual contest.

The contest will have 4 rounds:

A. Qualifier: It is an online contest. The contest is a 8 Days long contest having 3 problems. You need to score 100 points to qualify for the next round. You will receive points for every test case your solution passes — so you can get some points with partial solutions as well.

Note: The contest has been started from 17th June, 2017 9:00 P.M (IST) and will be live till 25th June, 2017 9:00 P.M (IST). You can register for it and participate till the end time of the contest.

Here is the registration link: https://www.hackerearth.com/challenge/competitive/programming-indiahacks-2017/

B. Wave 1.0 (First Elimination): It will be an online contest of 3 hours having 5 problems. Top 900 will make it to next round.

C. Wave 2.0 (Second Elimination): It will be an online contest of 3 hours having 6 problems. 50 contestants (top 25 Global + top 25 Indian) will move to the Finals.

D. Finals: It will be an online contest of 3 hours having 6 problems.

Prizes:

Last year contest link for practice:

1) Qualifier 1 (https://www.hackerearth.com/challenge/competitive/algorithms-qualifiers-round-1/)

2) Qualifier 2 (https://www.hackerearth.com/challenge/competitive/algorithms-qualifiers-round-2/)

3) Qualifier 3 (https://www.hackerearth.com/challenge/competitive/algorithms-qualifiers-round-3/)

4) Elimination (https://www.hackerearth.com/challenge/competitive/algorithms-india-hacks-2016/)

5) Finals (https://www.hackerearth.com/challenge/test/indiahacks-algorithm-finals/)

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

| Write comment?
»
7 years ago, # |
Rev. 2   Vote: I like it -10 Vote: I do not like it

I saw the problems, they are pretty awesome.

»
7 years ago, # |
  Vote: I like it +19 Vote: I do not like it

It is not very encouraging to participate in contest if hardest thing to do in first problem is to realize that author is not very clever and wanted to put a tricky case so he created a case violating task's description. Or are you going to tell me that "In one operation, he can choose any two positions in the array, and can swap their values. He has to perform exactly one operation" means that he performs one operation in which he decides to do nothing, because "he can" and not "he must" :P? Or that these two positions need not to be distinct.

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

    To me it was pretty clear: grep 'distinct' <<< 'any two positions'

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

      Don't be such a smarty-pants here. I remember some anecdote that went like this:

      "Math professor: Let X be a point and Y be a point
      Student: Why didn't you say "Let X and Y be points"?
      Prof: Because they can be the same point"

      It is not clear when you say "Let X, Y be sths" whether they need to be distinct or not, but I would say common agreement seems to be closer that they need to (however it sometimes depends on what that sth is, for sth=number it would be unreasonable to exclude being equal). What arouses more suspicions is that word "exactly" was used explicitly when "at most" could have been easily used clearing all possible doubts.

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

        Well in your example it's not clear that X and Y can't coincide (unless it's that professor's convention). There are often plenty of questions about obvious things during contests because you can't be sure of such things unless you have big flashing neon letters, someone's holding your head in their direction and screaming "look!".

        If you want to argue that the problem statement is confusing, sure, but it isn't invalid — you're just assuming something extra. A reasonable assumption is still an assumption.

»
7 years ago, # |
  Vote: I like it +36 Vote: I do not like it

It seems I can't take part in Wave 1.0 though I got 100 pts in the IndiaHacks Programming Qualifier. why?

Here is the message that appears when I access to this page. https://www.hackerearth.com/challenge/competitive/indiahacks-2017-programming-wave-10-eliminator-1/

Restricted Challenge – No Access
You are not allowed to participate in this challenge as this is an invite only challenge.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +7 Vote: I do not like it

    It doesn't work for me too, and I've got the same 100 points.

  • »
    »
    7 years ago, # ^ |
    Rev. 2   Vote: I like it +15 Vote: I do not like it

    I contacted Hackerearth and got this message.

    "The test invite will be sent to the users for the Wave 1.0 Eliminator who have scored more than 100 at least 48 hours before the start of the challenge. "

    PS:It may have been written that who have scored more than 100 but actually it is greater than or equal to 100

    Main thing is that we will be receiving mails at least 48 hours before the start of the challenge.

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

I can’t register for the contest despite qualifying.

»
7 years ago, # |
Rev. 3   Vote: I like it +15 Vote: I do not like it

It is mentioned in the mail that the "test" will become active at some specified time. So, it is not a contest but rather a test similar to hiring challenges for companies. How are competitors supposed to be ranked according to that?

In previous tests, I have seen that the time taken by programmer is relative to the time he/she starts the test and not the scheduled time from which the test link is available. Due to this, cases of cheating have occurred earlier (read comments from this blog) when a person opened the test through a fake account, viewed (and solved) the problems and then submitted through his main account thereby incurring minimal penalty. Can someone please clarify whether the ranking system for this "test" is similar to the ones for hiring challenges?

»
7 years ago, # |
  Vote: I like it +13 Vote: I do not like it

The First Elimination is started. Link of the contest have been send to all the qualified contestants. Happy Coding :)

»
7 years ago, # |
  Vote: I like it +44 Vote: I do not like it

During the contest, the penalty was given only if the solution scored exactly zero points. Anything that passed at least one testcase was considered correct. That seems a bit weird, almost any bugged solution passes at least one testcase, unless you are really unlucky, so the penalty effectively isn't there. Is this how it should work? In the current round it is irrelevant, but in future it may become relevant.

»
7 years ago, # |
  Vote: I like it +55 Vote: I do not like it

That moment when top 900 people are supposed to qualify for next round but only 639 people participated.

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

    Thats because they didn't send any reminders. I for example forgot to participate

    • »
      »
      »
      7 years ago, # ^ |
        Vote: I like it +11 Vote: I do not like it

      I got an email couple days ago actually. Though there was none several hours before the contest and I nearly missed it too.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    So do you qualify if you get 0? Man, I was too busy and I forgot. Should have just submit a blank submission?

»
7 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Can someone please explain the solution for Simple Task.Not able to understand it from the editorial.

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Someone, please help me with this problem, Hard Task. There are some concepts in the editorial I just couldn't understand.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    I have a completely different approach. Let the number of occurrences of i-th bit be ai + 2bi, where ai is 0 or 1. Note that any sequence of length n can be expressed in this form with condition 0 ≤ ai + 2bi ≤ n and also any set of 0 ≤ ai + 2bi ≤ n describes at least one sequence.

    In a correct sequence, we have and . We can see that ai are bits of X. On the other hand, by subtracting these equations we arrive at . Conditions that follows immediately are that S - X must be divisible by 2 and non-negative.

    For n ≥ 3 the solution always exist — we take bi as bits of (note that bi is allowed to be greater than 1 but it isn't necessary). For n < 3 there is nothing better to do than try to take bi as bits of but this time we need to check if ai + 2bi ≤ n for each i.

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

How to solve Simple Task in O(n*K)?

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

For all those who forgot to participate in Round 2 on July 9th, one more opportunity(wildcard) see this — https://www.hackerearth.com/challenge/competitive/indiahacks-2017-programming-qualifier-wildcard/