Hi since I didn’t see a discussion thread for ZIO this year, I decided to make one. Discuss answers/everything else here (I didn’t give ZIO myself though).
Q1) Given a binary string (represented by B and G for boys and girls in question), find the least number of switches (switching position of B and G from any index counts as 2) that maximizes the number of adjacent characters that are not the same.
Q2) Ways to partition an array (consisting of 1,2,3,…,n) into less than or equal to k sub arrays such that for any two sub arrays A and B, there are no elements a,c ∈ A and b,d ∈ B such that a<b<c<d.
Q3) Given a tree with bidirectional weighted edges. Pair nodes such that the sum of distances between each pair is minimized.
Q4) Lexicographically reorder all arrays whose individual elements add up to 1, 2, 3, so on. That is, the reordered list will be: [1],[1,1],[2],[1,1,1],[1,2],[2,1], [3]… and so on. Find the sum of the digits in the 10^6th element of list and product of the digits in the 10^9th element in the list.
These questions are a summarized version and I have skipped over a few details/story-setting.
Hello all, This us my first time in zio , I am sure that q3 is correct , but q1 might not be . Btw, does anybody have any idea about cutoffs of class 7 and below? I am in class 6
I think Problem-1 and 3 are so easy. The first two subtasks of problem-4 are also easy However Subtask-3 of problem-4 was little harder. I think most tough problem was 2nd one.
for 1c I got 10.
as far as I remember there were 11 G’s and 8 B’s so the optimal string that could be obtained is
GBGBGBGBGBGBGBGBGGG. I compared this string with the one given in the question and there was a difference of 10 letters, which included 5 G’s and 5 B’s, so I answered it as 10.
However, I am not sure whether this approach is correct.