Coder Social home page Coder Social logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
FPS doesn't define any special file name for test cases.
That's HUSTOJ's implementation by now using the followed rule :

When Exporting: using 1st *.in file in data dir whose name is not sample.in as 
export
<test_input/test_output>.
When Importing: using test.in/test.out for imported <test_input/test_output>.

If you are using HUSTOJ, that's designed system behavior,by now.

If you are implementing FPS in another OJ system, you can deside what ever 
after the
FPS file is readed, or before the FPS file is written.


Original comment by [email protected] on 11 Apr 2010 at 10:37

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
there maybe some mis-understanding here:

FPS is designed to be used for ProblemSet exchange, so there MUST be at least 
one
more test case other than sample included in the FPS to let the receiver of FPS 
to
REALY use it in a WORKING OJ system.

if you want to keep some secret "blind" test case in the sender's OJ, the best 
way is
to keep at least 3 cases in the data dir:
 sample.in test.in x_the_blind_test_data.in

Original comment by [email protected] on 11 Apr 2010 at 11:36

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
for x_the_blind_test_data.in:
x consist for single digit number?

Original comment by method4libe on 11 Apr 2010 at 4:47

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
just pair of XXX.in and XXX.out

judger is using all the file end with .in to test,
while Export using sample.in and one other file.

let's see the code of exporter

{{{
function getTestFileName($pid,$OJ_DATA) {
        $ret = "";
        $pdir = opendir ( "$OJ_DATA/$pid/" );
        while ( $file = readdir ( $pdir ) ) {
                $pinfo = pathinfo ( $file );
                if ($pinfo ['extension'] == "in" && $pinfo ['basename'] != "sample.in") {
                        $ret = basename ( $pinfo ['basename'], "." . $pinfo
['extension'] );
                        break;
                }
        }
        closedir ( $pdir );
        return $ret;
}



}}}

Original comment by [email protected] on 12 Apr 2010 at 12:27

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
I think just one test case file( except sample i/o ) used when a problem export 
to FPS 
format is not a good way. I suggest change FPS format for flexibility.

Like IOI, USACO, NEERC regional, they use multiple test cases files for test 
and 
their's test case for isn't suitable FPS. 

Original comment by method4libe on 13 Apr 2010 at 7:02

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
agree,that's just in the list of further developing.

maybe fps2.0 :)

Original comment by [email protected] on 13 Apr 2010 at 1:18

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
FPS can store more test cases without a lot change
just add a serial attribute in the test_input/ouput element like 

<test_input sno="1" >....

but obviously add a new element of <test_case> will be a better choice:

<!ELEMENT test_case (test_input,test_output)>

which one would you like ?

i might do that next week or so, would you like to try some coding.

i hope we can make our code compact with the old version

Original comment by [email protected] on 13 Apr 2010 at 3:06

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
now it's enabled with r198

and should be compatible with the previous version which dealing with 
single-testcase

Original comment by [email protected] on 14 Apr 2010 at 1:16

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024

Original comment by [email protected] on 5 Jun 2010 at 4:52

  • Changed state: Fixed

from hustoj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.