Skip to content
virusdefender edited this page Apr 28, 2016 · 4 revisions

对于普通题目,测试用例文件包括inout两种拓展名,对于Special Judge就只有in一种文件。

压缩时,请将文件都放在压缩包的根目录,而不是包含在某一个文件夹中,比如正确的格式是

➜  testcase pwd
/tmp/testcase
➜  testcase tree
.
├── 1.in
├── 1.out

0 directories, 2 files

下面是错误的,

➜  testcase pwd
/tmp/testcase
➜  testcase tree
.
├── 1
│   ├── 1.in
│   └── 1.out

1 directories, 2 files

然后压缩测试用例到一个zip中

➜  testcase zip testcase.zip ./{*.in,*.out}
  adding: 1.in (stored 0%)
  adding: 1.out (stored 0%)

查看压缩包的内容

➜  testcase unzip -v testcase.zip 
Archive:  testcase.zip
 Length   Method    Size  Ratio   Date   Time   CRC-32    Name
--------  ------  ------- -----   ----   ----   ------    ----
       0  Stored        0   0%  04-28-16 16:27  00000000  1.in
       0  Stored        0   0%  04-28-16 16:27  00000000  1.out
--------          -------  ---                            -------
       0                0   0%                            2 files

如果是在图形界面下压缩,请选中需要压缩的文件,右键直接压缩就可以。

如果认为正确压缩了,但是还提示文件格式或者文件数量错误,请查看是否压缩进去了隐藏文件,Windows下可能是$RECYCLE.BIN等,Mac下是.DS_Store,Linux下可能是1.in~或者.1.in.swp文件。

同时建议尽量合并测试用例到一个文件中,减少测试用例组数,详见 https://github.com/QingdaoU/OnlineJudge/wiki/%E5%AE%9E%E9%99%85%E8%BF%90%E8%A1%8C%E6%97%B6%E9%97%B4%E5%92%8CCPU%E6%97%B6%E9%97%B4