×

# [closed] Doubt in MIKE3

 0 I just want to know why my this submission didn't worked but a recursive brute force worked. Can you give me a case where it fails. Thank you :) I updated the link. Sorry for the confusion. asked 18 Mar '14, 15:20 498●1●7●16 accept rate: 22% 0★admin ♦♦ 19.6k●349●497●539

### The question has been closed for the following reason "The question is answered, right answer was accepted" by ashish1610 18 Mar '14, 21:19

 2 @ashish1610 General advice for getting testcases where your code fails. As you have an AC, so I assume that you had a solution which was accepted, now what you can do is generate random test-cases and run both your AC and WA solutions and check where the solutions of both cases don't match. This generally helps me, I dont know if this is a recommended thing or not but it has helped me a lot. In case I dont have AC solution with me, I use brute-force approach if my main aim is to know where it gets wrong. answered 18 Mar '14, 19:30 506●6●11●18 accept rate: 10%
 0 I got that but I never got the case where it fails. Finally I wrote up the recursive brute force solution for this. Can you please provide me the case. And no my submission answered correct ans for all the cases that I made by my own. answered 18 Mar '14, 15:40 498●1●7●16 accept rate: 22%
 0 Please check this [Editing test case] 40 16 4 1 4 20 24 2 33 39 4 18 33 35 40 3 12 30 34 4 1 17 31 37 2 12 40 2 34 35 2 5 13 2 7 16 3 17 27 39 3 7 9 10 4 8 18 20 35 2 19 26 1 11 1 30 4 3 9 23 34  answered 18 Mar '14, 16:14 5★mjbpl 419●2●7 accept rate: 6% I am assuming it is 1 1 rather than 1 1 15 in 2nd line and 2 3 15 rather than 3 3 15 (18 Mar '14, 16:35) It gave correct ans. (18 Mar '14, 16:39) I am sorry Ashish. It seems I made a mistake in understanding your logic. (18 Mar '14, 17:10) mjbpl5★ 100 9 1 1 3 2 1 9 3 3 1 9 3 4 1 9 3 5 1 9 3 6 1 9 5 2 3 4 5 6 2 6 7 2 7 9 (18 Mar '14, 17:18) jangwa2★ 2 Found it!!! 40 16 4 1 4 20 24 2 33 39 4 18 33 35 40 3 12 30 34 4 1 17 31 37 2 12 40 2 34 35 2 5 13 2 7 16 3 17 27 39 3 7 9 10 4 8 18 20 35 2 19 26 1 11 1 30 4 3 9 23 34 Expected 10, your program returns 9. (18 Mar '14, 17:41) mjbpl5★ Thanks @mjbpl (18 Mar '14, 17:52) showing 5 of 6 show all

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:

×294
×9

question asked: 18 Mar '14, 15:20

question was seen: 948 times

last updated: 19 Mar '14, 14:17