×

# I think I found a loop hole in MAKETRI February Long Challenge 2017 question's test cases?

 2 Consider the following code, which gets AC with 100 points for the question. The code can be found here: https://www.codechef.com/viewsolution/13056645 Now, consider the following test case: 3 500 700 1 5 15 The intervals formed by the numbers are [5, 5] and [11,19]. Both these intervals are not present in the [L,R] range of [500,700]. Which implies that the answer for the above test case must be 0. However, if you were to feed in that test case to the code solution in the link above, it gives 1. Which is wrong. So, if that test case was included in the original contest, some submissions that got an AC would have got a WA. Please correct me if I missed out on any constraints, etc and there isn't a loop hole. asked 17 Mar '17, 11:11 3★mukund_a 53●4 accept rate: 0%

 2 I mentioned this in last paragraph of the editorial, that the problem was missing a few corner cases. That's why I edited the editorial to provide additional corner cases and asked people to run through them too. Disjoint interval concept were not properly tested. All test cases had overlapping intervals in range [L,R]. I think that they wanted to be lenient, since its not a category of test-case someone particularly misses. But of course, @errichto can perhaps help us and add test cases to practice problem I guess. :) answered 17 Mar '17, 11:16 15.4k●1●20●66 accept rate: 18% @vijju123, oh nice! Yes I agree with you. (17 Mar '17, 12:06) mukund_a3★
 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:

×595
×5

question asked: 17 Mar '17, 11:11

question was seen: 441 times

last updated: 17 Mar '17, 12:06