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

×

I don't understand the statement"Sum of |s| over all test cases in a single test file "

Hi All, I am new to codechef . I want to understand "1 ≤ Sum of |s| over all test cases in a single test file ≤ 10^6" statement . Subtask #1 (30 points)

1 ≤ T, |s| ≤ 10^3 1 ≤ Sum of |s| over all test cases in a single test file ≤ 10^4.

My solution gives out : Sub-Task Task # Score Result (time) 1 1 NA AC(0.000000) 1 2 NA AC(0.000000) 1 3 NA WA(0.000000)

I just want to understand the above statement and results . Thanks

asked 09 Jul '17, 05:51

rishabhdubey9's gravatar image

2★rishabhdubey9
32
accept rate: 0%


When codechef tester tests your code it uses a set of files. While testing each file, your program must not exceed the time limit that the problem states. So what its saying is that in a file of test (which can have several tests), if you sum the lengths of all of the tests, it will not be greater than 10^4, it only has to do with the limit time, so as your problem is a "Wrong answer" that statement doesn't have to be with your mistake, maybe your code is not working for strings of length <= 10^3

link

answered 09 Jul '17, 06:01

dfonnegrag's gravatar image

3★dfonnegrag
453
accept rate: 25%

Thank you :)

(09 Jul '17, 06:42) rishabhdubey92★

How can I make it work for string greater than 10^3. for c program the max limit is 4095 characters. For java its much larger . I had submitted the solution in both languages but still the subtask 1 task 3 is WA .If solution is working for strings <10^3 then it should work for larger string as well.I dont understand.Please help me out.

(09 Jul '17, 07:43) rishabhdubey92★

You are getting wrong ans in subtask 1, task 3. That means your solution isn't even working for strings < 10^3. Try to see if the algo is correct.

link

answered 09 Jul '17, 10:15

sudip_95's gravatar image

4★sudip_95
7556
accept rate: 10%

Thank Sudip.I just want to if my solution is wrong or my code is taking time .So this means my solution is wrong i guess. That is what it referring to ?

(09 Jul '17, 13:04) rishabhdubey92★

The suitable verdicts are given. Please read codechef FAQ as it contains all relevant information.

WA = wrong answer. TLE= Time limit exceeded (but everything printed till now is correct)

(09 Jul '17, 14:18) vijju123 ♦♦5★

Thanks vijju :)

(10 Jul '17, 05:11) rishabhdubey92★
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:

×49
×41
×26

question asked: 09 Jul '17, 05:51

question was seen: 1,466 times

last updated: 10 Jul '17, 05:11