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

×

[closed] MAY17 Challenge: MAXMEDIAN problem Clarification

https://www.codechef.com/MAY17/problems/MXMEDIAN

Case #2: If we permute array A in this way: 1 4 5 6 2 3

So array B: 4 6 3

So median becomes 6.

What am I missing?

asked 06 May '17, 00:59

theintel's gravatar image

3★theintel
479
accept rate: 0%

closed 06 May '17, 01:42

vijju123's gravatar image

5★vijju123 ♦♦
15.1k11857

The question has been closed for the following reason "Question is related to ongoing contest" by vijju123 06 May '17, 01:42


To find median, you first sort the numbers in either asc or desc order and then select the middle number.

4 6 3 will be written as 3 4 6. So median would be 4.

link

answered 06 May '17, 01:05

abdullah768's gravatar image

6★abdullah768
2.4k420
accept rate: 17%

Missed the sorting, although I took HackerRank's Statistics course, pathetic.

(06 May '17, 01:09) theintel3★

@abdullah768 this is half the solution you shouldn't have stated that to him. :| and please refrain from answering questions related to ongoing contest. I too had the same doubt but little thinking resolves it.

(06 May '17, 06:26) neilit19923★
1

Sorry, I thought it was basic stuff about medians :!

(06 May '17, 09:47) abdullah7686★

Thats why i said, these things shouldnt be discussed on discuss forums.

(06 May '17, 12:46) vijju123 ♦♦5★

@abdullah768 Yeah, it was like telling an array index starts with 0.

@neilit1992 No offense, but how the definition of median was half the solution? The principal part of the problem was to figure out a possible permutation, anyone could see the median.

(06 May '17, 12:46) theintel3★
1

@theintel okay no problem, anyway please refrain from asking questions related to ongoing contest, post in comment section, @admin ll be able to provide a better explanation always because they wrote the question we are just trying to solve according to what intuitively seems correct.

(06 May '17, 13:28) neilit19923★

@neilit1992 Asked them, administrators are too busy to answer. So there was no way to be clarified except asking in the discussions. Hopefully admin checks the comments section more frequently. ☺

(06 May '17, 22:31) theintel3★

The concern raised by @theintel is correct. If admins dont answer in comments, then there will be threads in discuss and fairness would get compromised. My query had been over 30 hours and no answer (I got Q after 5-6 reading more, was able to get AC, but point is, they SHOULD reply)

(06 May '17, 22:39) vijju123 ♦♦5★
showing 5 of 8 show all

I am not exactly sure that requesting clarification of problem statement from other user (on discuss or elsewhere) is allowed or not.

Anyways, please try to post on-going contest related queries as comments on contest page. If @admin feels that your question is violating the rules (eg- no discussion abut any problem of an on-going contest) he can take action against you ( reduced ratings or suspension from discuss or both).

Basically, i want to say is take care. Its best to stick to safer side. :)

link

answered 06 May '17, 01:41

vijju123's gravatar image

5★vijju123 ♦♦
15.1k11857
accept rate: 18%

edited 06 May '17, 01:42

1

@vijju123

I believe you understand that it didn't reveal any algorithm for the problem.

And I tried the Comments section in the problem (you may check). Probably the problem setters are too occupied in other works to answer.

(06 May '17, 02:04) theintel3★

"I believe you understand that it didn't reveal any algorithm for the problem."

I know. Thats why i said i am not exactly sure.

"Probably the problem setters are too occupied in other works to answer.

(06 May '17, 02:15) vijju123 ♦♦5★
1

My point is, usually if you see any contest, they ban requesting for sample test cases, or giving answers like "For this test case the expected output is this."

No doubt people still do that, and admins show some leniency in this case. But still, as i said, better to be safe. Thats all! :)

(06 May '17, 02:18) vijju123 ♦♦5★

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:

×833

question asked: 06 May '17, 00:59

question was seen: 1,195 times

last updated: 06 May '17, 22:39