ZIO 2017 Discussion

@mathecodician why not after all you are in class 8th.

1 Like

also for 6th i am getting 595

Why didn’t you give the answer 11 and 12. You could have randomly written any answer as there is no negative marking.

7th is 15
8th is 10
9th is 145
I’ll tell you the explanations when I get the questions.

Questions 1-8 are definitely correct and also ques 10 and Q9 is wrong, not sure about the rest.

If anyone wrote it down.

i have the explanation take the minimum H value person and make him the seeker for that many round then each H value goes down by minimum H and thus ans is {min H}+{max H after substracting min H from it}

the above will just give u the max H value in the list

The explanation is simple.

Consider the sum (S) of the number of times a person wants to be a hider.

Notice that in each round, this sum decreases by N-1

So the final answer is [S/(N-1)] + 1 where [] is greatest integer function

1 Like

I am pretty sure that the max value of H[n] will give u the answer

No it won’t give the max. For example, take n = 3 and h[1] = 1, h[2] = 1
and h[3] = 1 .
The answer in this case is not 1 but the answer is two. You calculate that yourself.

Let’s put all the people in accommodation B. Note the sum of distances. This definitely can’t be the shortest.

You need to push min: 2, max: 5 people from B to A.

Find B[i]-A[i] for each i (with sign) and arrange in descending order.

The top 5 are the ones you will push from B to A to get the shortest distance.

In Delhi there were about 400 students but the location and the ambience was very bad.

No i mean the explanation of question 10 11 12

Btw i was getting 595 in q.6

Plz post the questions as well if possible

Could you please post your solution to the 4th problem? It would help to know better approaches :slight_smile:

The answers for the last question should be something like 21, 144, 154.

The expected solution was using dynamic programming :

dp[i][0] denotes number of subsequences in the first (i) indices of the string that end with “0”

dp[i][1] denotes the same for “00”

dp[i][2] denotes the same for “001”

dp[i][3] denotes the same for “0011”

What we seek is just dp[stringLength][3]


(http://pastie.org/pastes/10966296/text?key=zzyanb8jua9cfjomrklrq)
1 Like

I literally did the ditto same thing by making a dp matrice.
But because of some calculation mistake, I got the second part wrong.

Ah, that’s ok. You did exceptionally well, especially considering that you’re an 8th grader.

2 Likes