I built my own Online judge for hosting the Intra-College Programming Contest
.The Judge is similar and as good as SPOJ,Codechef,UVA,etc. At present, my online judge use the same logic as above three websites for checking whether, the answer is Correct(Accepted) or Wrong
.That is, it runs the user program against the standard official test cases
and compares the output file generated by user program against the standard(expected) output file
.When user output file matches the expected output file , then verdict is correct answer
else Wrong Answer
.
Now, I want to add a feature of Individual test case scoring system
like InterviewStreet.com.The user is awarded point on the basis of Number of Test-cases Passed(Accepted).[Refer the above pic]. I am not able to think of an efficient method/way for implementing it.
My Initial Intrusion is:
Put each test cases(assume there are total T Test-cases) Inputs in T separate input files(in1.txt,in2.txt,in3.txt,...inT.txt) and expected outputs in another T separate files(out1.txt,out2.txt,out3.txt,....outT.txt) and run the user program T times, one for each input test case(input files).
But that doesn't sound good.When the number of Test-cases T
are large, then Compilation Server will be very slow as user program has to be run T times.
Please Suggest me some fast and efficient way of Implementing Individual Test-Case Scoring system .