You are not logged in. Please login at www.codechef.com to post your questions!

×

ZCO 2019 Discussion

I've attached a spreadsheet for ZCO 2019 Scores. Please update this Spreadsheet after you finish the ZCO 2019 Contest. Solutions can be discussed here after the contest. :-)

Click the below link to access the spreadsheet.

ZCO 2019 Scores Spreadsheet Link

Important Notice: This is not an OFFICIAL Ranklist. It is for discussing and estimating cutoffs for ZCO 2019 amongst the participants before the Official Results are announced by the Organizers of ZCO 2019.

asked 01 Dec '18, 19:36

kristopher's gravatar image

4★kristopher
383
accept rate: 12%

@lokesh2002 had already made a spreadsheet, which also has the scores for ZIO. Please replace yours with his, as it's better to have all the scores in one place.

(01 Dec '18, 22:42) the_extractor4★

@kristopher Everyone on ico whatsapp group have this link,and it can be used for all three Zio/Zco/INOI. why a new one?.

(01 Dec '18, 23:44) lokesh20024★

I just hope the cutoff is 15.

Can anyone tell me the solution for the first problem? Some where saying using mergesort...

Please post your solution for the first problem if anyone solved it fully. code not needed. thanks.

link

answered 02 Dec '18, 17:28

rajarshi_basu's gravatar image

6★rajarshi_basu
6177
accept rate: 10%

Here's my code for problem 1.

The logic is pretty simple. Construct two arrays of pair of integers, L and R. In the first position of each element l of L we put in the value l we receive and in the second position, we put in the index. Create a similar array for R.
Now sort the array L in decreasing order, and R in increasing order.
The score of the i-th person would be the sum of the positions of its corresponding l in L and its corresponding r in R.

For example, if $n = 3$, and the l and r values are $$(10, 20), (13, 15), (14, 16)$$ The $L$ and $R$ would be, after sorting, $$L: (14, 2), (13, 1), (10, 0)$$ $$R: (15, 1), (16, 2), (20, 0)$$ Now, $\text{score}[0] = 2 + 2 = 4$, $\text{score}1 = 0 + 1$, $\text{score}[2] = 1 + 0$.

Though sadly I was getting WA in the test itself, I have no idea why. My logic is sound.
So, I just wrote a quick brute-force solution and got 15. :/

link

answered 02 Dec '18, 18:14

islingr's gravatar image

4★islingr
513
accept rate: 0%

edited 02 Dec '18, 18:32

Is there an ICO WhatsApp group?! I didn't know about this, could you please upload the group link.

link

answered 02 Dec '18, 14:27

karan26122001's gravatar image

2★karan26122001
11
accept rate: 0%

How did you do the first problem(singing competition)? I did it with brute force, and it was partially accepted.

link

answered 02 Dec '18, 15:24

jagoshom's gravatar image

1★jagoshom
1
accept rate: 0%

@jagoshom I got a 40 point solution. What I did was visualise the ranges on a straight line.Since there can't be any draws the pair with the lowest lower range should have the highest upper range as well.So I stored the ranges in a vector of pairs and sorted the vector. The ans for the ith is 2*(n-i-1). Then I undid the sorting. This clears the second subtask. Someone help me with the 100 point solution please.

link

answered 02 Dec '18, 16:03

bdyutish's gravatar image

2★bdyutish
11
accept rate: 0%

edited 02 Dec '18, 16:04

Well, as far as i heard the first problem, basically it was for each range, count total number of ranges lying totally inside it and number of ranges partially overlapping with it. Both can be solved quite easily using merge sort trees or persistance or any other 2D DataStructure of your choice. That would have made this a blind implementation problem. the intended solution is probably using some binary searches, using which u can determine how many ranges are outside ur boundary and how many are inside. PS: work out the details urself.

(02 Dec '18, 17:26) rajarshi_basu6★

I did a brute force for the 15pt one, for the 40pt one I did the sorting thing but I did not get the right answer because I was not able to output the answer in the original order.How did you overcome this problem?

link

answered 02 Dec '18, 16:10

karan26122001's gravatar image

2★karan26122001
11
accept rate: 0%

What was the method for the first one?

link

answered 02 Dec '18, 16:11

karan26122001's gravatar image

2★karan26122001
11
accept rate: 0%

I had hell of a time figuring out the way to undo sorting. I finally kept 1 ordered map where keys were elements and values were all 0. And seperately stored the original order in a vector. I then printed 2*(N-i-1) for each i.

link

answered 02 Dec '18, 16:26

arnavvarshney's gravatar image

3★arnavvarshney
1438
accept rate: 10%

@kayak your code is difficult to understand since it is uncommented. Just post your logic

link

answered 02 Dec '18, 16:29

karan26122001's gravatar image

2★karan26122001
11
accept rate: 0%

You need to watch Baahubali to understand the code properly.

(02 Dec '18, 16:34) kayak3★

Damn shouldve known that :o

(02 Dec '18, 16:36) karan261220012★

@bdyutish How did you undo the sorting?

link

answered 02 Dec '18, 16:33

jagoshom's gravatar image

1★jagoshom
1
accept rate: 0%

@jagoshom I kept a map of pairs as keys and the original indexes as values.You calculate the ans for the sorted vector and assign the answers to an array in the original location using the map.

link

answered 02 Dec '18, 16:59

bdyutish's gravatar image

2★bdyutish
11
accept rate: 0%

edited 02 Dec '18, 17:13

Can grp admin pls upload the link to the ICO WhatsApp grp? Also @kristopher , people are uploading their marks in both the spread sheets. Pls copy the data till now, and delete one, else analysis is going to get pretty messed up.

link

answered 02 Dec '18, 18:24

priyanshul's gravatar image

3★priyanshul
1
accept rate: 0%

Is there any chance the cutoff goes down to 15?

link

answered 02 Dec '18, 18:27

mg21's gravatar image

1★mg21
0
accept rate: 0%

When are the results released?Like, any idea?

link

answered 02 Dec '18, 20:21

ashutoshtrip's gravatar image

3★ashutoshtrip
111
accept rate: 0%

Please share the logic for the second one.

link

answered 02 Dec '18, 21:35

karan26122001's gravatar image

2★karan26122001
11
accept rate: 0%

Can someone who has got 100pts in the first question share their logic.

link

answered 02 Dec '18, 21:37

karan26122001's gravatar image

2★karan26122001
11
accept rate: 0%

@mg21 it is most probably not going to be 15 since almost anyone could get 15

link

answered 02 Dec '18, 21:44

karan26122001's gravatar image

2★karan26122001
11
accept rate: 0%

For the second DP problem there are few basic observations.

1) We always put an integer because it will always increase the answer.

2) The answer can either be the maximum length of UpDown subsegment already present+1 ( put any integer at last in the subsegment) or it can be combination of 2 subsegments which are just separated by 1 element which doesn't obey the property. We can make the "bad" element "good" by inserting an integer beside it.

Let $dp1[i]$ = maximum length of UpDown subsegment ending at index $i$

Let $dp2[i]$ = maximum length of UpDown subsegment starting at index $i$

Now all that is left is to go through each index and find maximum value of $dp1[i]+dp2[i]$ . We can calculate DP and do this in $O(n)$ with very small constant factor.

P.S. I may have missed some details and it is left as an exercise for the reader :P

link

answered 03 Dec '18, 08:03

vatsalsharma_3's gravatar image

4★vatsalsharma_3
1785
accept rate: 11%

edited 03 Dec '18, 08:06

Is there any 11th student here who is interested in making a WhatsApp group to prepare for next year's ZCO?

link

answered 03 Dec '18, 18:05

karan26122001's gravatar image

2★karan26122001
11
accept rate: 0%

Any idea when the results are coming out?

link

answered 03 Dec '18, 18:06

karan26122001's gravatar image

2★karan26122001
11
accept rate: 0%

The results are probably gonna be out by Monday i.e,10/12/2018(seeing from previous trends of announcing results ,that is) . Btw ,did anyone properly notice the time limit for the questions? It was 2 seconds .Even a brute Force approach should have worked in c++ and other languages (Java - twice the time limit and python -4 times I guess),according to using just 10^7 ooperations per seconds .

link

answered 08 Dec '18, 12:40

agniva_basak's gravatar image

3★agniva_basak
212
accept rate: 0%

The results have been probably declared. I received a mail from CodeChef, stating that all students with a score >= 40 have qualified for INOI 2019.

Cheers!

Arnav.

link

answered 13 Dec '18, 11:27

arnavvarshney's gravatar image

3★arnavvarshney
1438
accept rate: 10%

I was getting runtime error (SIGSEGV) for my brute force code for Singing Tournament, I don't know the reason behind it. My code - https://ideone.com/Gb5ezB , Please Help.

link

answered 16 Dec '18, 13:28

zco19c10358's gravatar image

0★zco19c10358
11
accept rate: 0%

edited 16 Dec '18, 13:29

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,211
×646
×423
×210
×160
×152
×16

question asked: 01 Dec '18, 19:36

question was seen: 2,424 times

last updated: 16 Dec '18, 13:29