Alok Nath, really really curious!

I haven’t been able to solve it, however much i tried.
I had a question on the Test Cases though…does anyone know if the Judge uses a fixed set of tests every run, or the test cases change dynamically each time i submit a solution.
Logically, if i simply return “no” and “yes” for all sub-tasks in two different submissions, i should get the right answers for all the sub-tasks in one or the other submission.
But this is not the case.
I am not trying to hack it…a fruitless attempt in trying to isolate my bug.
Great question, though!!

No the Test files and cases are fixed. Each file contains a maximum of 10 test cases. Suppose you output “yes” on all submissions then you may get some out of the 10 test cases right but your answer for the Test file will be wrong, hence you will see a wrong answer.

test case are static they don’t change with time… and answer’s for different subtasks cant be determined by the way you are saying…
suppose for subtask one answer file is containing :
yes
no
yes
yes
no

so if you would print yes for all input it wont get accepted…
i hope i cleared your doubt…
PS:dont lose hope just keep on trying

thanks for answering.
I do see a “wrong” answer for the sub-tasks as a whole, but i meant the individual test cases within the 2 sub-tasks. Printing “yes” and “no” alternately in two submissions should yield correct/passed solutions for all the test cases in both the sub-tasks, though the sub-tasks may themselves have failed. Not a big deal, maybe something i am not aware of…could be just easier to actually debug instead of speculating. :slight_smile:

My doubt remains, but thanks for taking the time to answer. And the encouragement!! After close to 120 failed submissions, i need it! :slight_smile: :slight_smile:

the problem is that you are thinking the codechef runs your code on test cases , but these are actually “test files” . A test files consists of multiple test cases , so to get a test file pass your code need to pass all test cases in the test file .
The individual cases shown under the subtasks are actually test files , so printing yes and no wont help .

great!! That explains it!!

sub-tasks actually consist of numerous test files

@jhapra :slight_smile: :slight_smile:

my code is 100% correct i dont know why subtask 1 task #2 and subtask2 task #7 are wron rest all are correct please help

no help during contest