×

# Bug in CHEFCSC

 1 2 I think there is something wrong with the challenge problem of FEB long contest 2015 http://www.codechef.com/FEB15/problems/CHEFCSC. One bug that i detected is that answer to sample test case is not validated according to problem statement. Explanation:- Statement: Chef can place some frame at position i if i + lengthj ≤ N - 1 where lengthj is the length of this frame. Sample case: Input: zzabcndedzzabd 3 11 3 2 2 8 5 5 Output: -1 0 9 Bug: if the frame with length 2(lengthj) is used at position 9(i) and N is 3. Then statement (9+2)<=(3-1) is false, but in sample test case this is not validated. Please guys explain the problem statement. asked 09 Feb '15, 13:52 123●1●7 accept rate: 7% 0★admin ♦♦ 19.8k●350●498●541

 2 Input format: Firs line contains string S. Next line contains two integers N - number of frames, D - amount of money. Next line contains N integers denoting the lengths of appropriate frames. Next line contains N integers denoting the prices of appropriate frames. Input: zzabcndedzzabd 3 11 3 2 2 8 5 5 Here, clearly mentioned in the problem that N is 3 which is not the length of string S. Length of string S should be denoted by |s| according to problem statement. Why should I assume the thing that is not mentioned in the problem. answered 09 Feb '15, 16:05 123●1●7 accept rate: 7%
 2 They removed the problem at last. answered 10 Feb '15, 09:11 123●1●7 accept rate: 7%
 0 Here N is not 3 but refers to the length of the string. answered 09 Feb '15, 15:46 1 accept rate: 0%
 0 perhaps the problem will be updated, i contacted codechef for that answered 09 Feb '15, 20:57 123●1●7 accept rate: 7%
 0 problem got updated now. answered 09 Feb '15, 21:24 123●1●7 accept rate: 7%
 0 Again, the bug persists and they are updating it. answered 10 Feb '15, 00:50 123●1●7 accept rate: 7%
 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:

×2,736
×2,474
×690
×596
×427

question asked: 09 Feb '15, 13:52

question was seen: 2,357 times

last updated: 10 Feb '15, 09:11