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

×

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

vedprakash121's gravatar image

4★vedprakash121
12317
accept rate: 7%

edited 09 Feb '15, 17:01

admin's gravatar image

0★admin ♦♦
19.8k350498541


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.

link

answered 09 Feb '15, 16:05

vedprakash121's gravatar image

4★vedprakash121
12317
accept rate: 7%

edited 09 Feb '15, 16:07

They removed the problem at last.

link

answered 10 Feb '15, 09:11

vedprakash121's gravatar image

4★vedprakash121
12317
accept rate: 7%

Here N is not 3 but refers to the length of the string.

link

answered 09 Feb '15, 15:46

manav2018's gravatar image

3★manav2018
1
accept rate: 0%

perhaps the problem will be updated, i contacted codechef for that

link

answered 09 Feb '15, 20:57

vedprakash121's gravatar image

4★vedprakash121
12317
accept rate: 7%

problem got updated now.

link

answered 09 Feb '15, 21:24

vedprakash121's gravatar image

4★vedprakash121
12317
accept rate: 7%

Again, the bug persists and they are updating it.

link

answered 10 Feb '15, 00:50

vedprakash121's gravatar image

4★vedprakash121
12317
accept rate: 7%

toggle preview
Preview

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:

×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