×

# Regarding DEC18 Chef and Meatballs

 8 1 I am quite confused about DEC18 Chef and Meatballs because since the explanation of the example test states that 'The meatballs are sorted in ascending order of meatiness' (I suppose that it means 1 < 2 < 3 < 4 < 5 < 6) the first query (1, 2, 3, 4, 5) returns (3, 4) which are the 2-nd and 3-rd meatiest balls, while I expect it returns (2, 3). Am I wrong or the example has problems ? asked 08 Dec '18, 07:50 85●1●5 accept rate: 0%

 3 The example is correct. To clarify a bit, when the grader is given an input of 5 numbers, it arranges the numbers in increasing order of their meatiness and then returns the 3rd and the 4th number from the arranged order. answered 09 Dec '18, 17:33 48●2 accept rate: 33%
 4 Good question. The language used in that problem is confusing, and unfortunately you need to work out the meaning from the example, which I think you have done correctly. In normal English descriptions, the two index numbers returned are for the third and second meatiest meatballs. They are wrongly described as the third and fourth meatiest because they are the third and fourth entries in an ascending sorted list of the meatballs. @admin this needs correcting/clarifying in the problem. Further explanation: Given a test sample of meatballs, the feedback given is the 3rd and 4th entries in the following list sorted in ascending order of meatiness: least meaty 4th-most meaty 3rd-most meaty <<<< 2nd-most meaty <<<< Meatiest answered 09 Dec '18, 20:44 5★joffan 948●8 accept rate: 13% @admin I'm not sure how notification works so I'm pinging you in a comment also to correct/clarify this question (09 Dec '18, 22:44) joffan5★
 0 Since this is an ongoing contest, I would not say much. Firstly, the example is absolutely correct. The query returns the 3rd and 4th meatiest meat balls out of the five inputted. In the example test case, it returns 3 and 4 as they are the third and fourth meatiest respectively. 1<2<3<4<5 answered 08 Dec '18, 18:45 0 accept rate: 0%
 1 @priyanshul If we're given 5 meatballs with 5 being the meatiest and 1 the least, 5 would be the first meatiest one, 4 the second, 3 the third and 2 the fourth meatiest meatball. Shouldn't the output then be 3 2 instead of 3 4 answered 08 Dec '18, 19:32 11●1 accept rate: 0% I too have the same doubt. (08 Dec '18, 19:51) avi2244★
 0 @sauravchirania For example: We have meatballs numbered as [1,2,3,4,5] and considering the amount of meat they contain [9,10,13,8,14] respectively then 5th ball is the meatiest, 3rd ball is the 2nd meatiest, 2nd ball is the 3rd meatiest, 1st ball is the 4th meatiest as per the question (correct me if I am wrong). Grader:2 1 And according to you- [4,1,2,3,5] and their meatiness [8,9,10,13,14] Grader:2 3 answered 09 Dec '18, 18:47 2 accept rate: 0%
 0 @fakeid_v15 in the example you have given, the grader will return 2 3. I agree that the problem statement is a bit ambiguous but if you look at the sample test case given in the problem and the explanation I have given in my previous comment, you should be able to understand it. PS: I am not sure how to reply to a comment so I had to add this as a separate comment. answered 09 Dec '18, 21:23 48●2 accept rate: 33%
 0 Think of it like, the grader will sort the number in increasing order and then return the 3rd and 4th meatiest meatball number..... answered 09 Dec '18, 22:54 31●6 accept rate: 0%
 0 Let the meat balls arranged as : [5,8,1,2,9,10] Examples: ? 1 2 3 4 5 :: Grader -> 1,2 ? 1 2 6 4 5 :: Grdader -> 2,5 answered 12 Dec '18, 18:25 1 accept rate: 0%
 0 @thang040602 can u please explain the question if u understood answered 13 Dec '18, 10:53 3★andyy143 1 accept rate: 0%
 0 @catchup Same problem I'm facing answered 13 Dec '18, 14:46 3★gigawhiz -1 accept rate: 0%
 0 Just keep in mind that the grader will give 2nd and 3rd meatiest meatballs. I have done this way and I am getting correct answer. Try this way! Good luck ! answered 15 Dec '18, 18:52 37●4 accept rate: 0%
 0 If it was 3rd and 4th, would it be even solvable? answered 16 Dec '18, 01:46 3★yigoli 1 accept rate: 0%
 0 what output will i get if i repeat the number of meatballs? ex. [1,2,4,4,4] answered 16 Dec '18, 11:53 1 accept rate: 0% It's clearly mentioned in the question that all numbers have to be distinct. Hence your question is invalid. (16 Dec '18, 19:20) avi2244★
 0 well the language was definitely not clear at all from the question please @admin take this into account. answered 17 Dec '18, 16:25 4★srj1234 1 accept rate: 0%
 0 I had asked this exact doubt in the comment section of the question but the author did not reply unfortunately. answered 18 Dec '18, 12:03 4★vagueman 1 accept rate: 0% basically, the question was worded wrongly and you had to understand and consider the testcase and ignore the wording. (18 Dec '18, 12:05) vagueman4★
 2 Codechef exhibits again the lowest possible efforts in terms of checking their problems. Problems wrongly stated, test cases that do not match the specified formats, incomplete test cases, plainly wrong specifications. Litterally every contest is now plagued by the lack of serious of this platform. How many great problems and efforts can be ruined by the incapacity of this website to recognize their faults and to take the steps to improve their processes ? Give people laddus to spot errors if you're too lazy to make the most basic checks. I'm sorry about my tone, but litterally every contest for the last few months have had a huge problem that would be easy to avoid with a little professionalism. answered 19 Dec '18, 00:37 5★weng 41●2 accept rate: 0%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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:

×25

question asked: 08 Dec '18, 07:50

question was seen: 4,412 times

last updated: 19 Dec '18, 00:51