Git Product home page Git Product logo

Comments (3)

equation314 avatar equation314 commented on June 21, 2024

校验器可以是任意可执行程序,只需满足以下协议:

  1. 传入标准输入、标准输出、选手输出、结果输出文件名作为参数:

    ./spj <IN> <ANS> <OUT> <LOG>
    
  2. 程序返回值为 0 表示校验器检查成功,非 0 表示校验器崩溃。

  3. 结果输出文件需满足以下格式:

    1. 第一行一个 [0, 1] 的实数,表示得分比例。
    2. 第二行一个字符串,表示要显示在评测界面上的的信息。

可以参考全文比较的实现:https://github.com/sxyzccr/CCR-Plus/blob/master/src/tools/checker/fulltext_utf8.cpp

如要使用 testlib,保证生成的可执行程序满足该协议即可。

from ccr-plus.

tabbbbbb avatar tabbbbbb commented on June 21, 2024

in、ans、out、log的顺序可以换么,testlib.h的是in、out、ans。
结束ccr用的是End(string, state),testlib.h用的是类似quitf(_ok, "1")
如果我要把用testlib.h写的check改为支持ccr的check要如何改

from ccr-plus.

equation314 avatar equation314 commented on June 21, 2024

需要改 testlib.h,比如改这里调整参数顺序:

https://github.com/MikeMirzayanov/testlib/blob/6daa79fdc9c2b113be8d40f828e3dc81e67ce33d/testlib.h#L4268

from ccr-plus.

Related Issues (16)

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.