hustOJ SPJ(special judge)模板】的更多相关文章

转自:http://www.cnblogs.com/chouti/p/5752819.html Special Judge:当正确的输出结果不唯一的时候需要的自定义校验器 首先有个框架 #include<fstream> ifstream fin,fout,fstd ofstream fscore,freport; double Judge(){ } int main(int argc,char *argv[]) { //put something to fstreams... //Judge…
/* argv[1]:输入文件 argv[2]:选手输出文件 argv[3]:标准输出文件 argv[4]:单个测试点分值 argv[5]:输出最终得分的文件 argv[6]:输出错误报告的文件 */ #include<bits/stdc++.h> int n,k,a[100100]; using namespace std; void out_false1(); void out_false2(); void out_ok(); int main(int argc,char *argv[])…
首先你要会写一个叫$data.yml$的东西, 这里面记录了这道题的$subtask$计分策略 也告诉了评测姬这道题是提交答案还是$spj$还是交互题 那么,$YAML$语言是啥啊? 别问我,我也不会 本着会用能用就行的原则 给大家讲讲$LOJ$的$special\ jidge$怎么用 $yaml$里基本上的全部语法: $Structure$通过空格来展示.$Sequence$里的项用$-$来代表,Map里的键值对用$:$分隔. 在$LOJ$我们需要写一份类似这样的$data.yml$文件: (…
Description Given a positive integer n, find two non-negative integers a, b such that a2 + b2 = n. Input The first line contains the number of test cases T (1 <= T <= 1000). For each test case, there is only one line with an integer n (1 <= n <…
Problem Description Q:什么是 Special Judge,Special Judge 的题目有什么不同? A:一个题目可以接受多种正确答案,即有多组解的时候,题目就必须被 Special Judge.Special Judge 程序使用输入数据和一些其他信息来判答程序的输出,并将判答结果返回. NaYe 最近遇到了一个题,要求输出三个数,第三个数为前两个数的和,三个数都是素数,且前两个数小于 500000.他只需要输出任意一组符合要求的答案即认为是 Accepted.现在需…
#include <stdio.h> #include <math.h> #define PI acos(-1.0) #define AC 0 #define WA 1 int main(int argc,char *args[]) { FILE * f_in=fopen(args[],"r"); FILE * f_out=fopen(args[],"r"); FILE * f_user=fopen(args[],"r")…
引言 有时我们需要使用CCR测评器(CCR-Plus是一个开源的信息学竞赛测评软件,Github链接https://github.com/sxyzccr/CCR-Plus)进行SpecialJudge(以下简称SPJ).例如判断选手输出与标准输出的差距,大于一定的值就算错,这时就需要用SpecialJudge了. 在CCR测评器中,SPJ是用一项叫做自定义校验器的功能实现的.CCR的文档没有写明校验器的语法,网上也没有这一类的信息.于是,我在CCR的源代码中找到了CCR的默认校验器(全文比较),…
http://noi.openjudge.cn/ch0111/ No 题目 分数 01 查找最接近的元素 10 3176 02 二分法求函数的零点 10 2181 03 矩形分割 10 1420 04 网线主管 10 1648 05 派 10 1581 06 月度开销 10 1449 07 和为给定数 10 1906 08 不重复地输出数 10 1790 09 膨胀的木棍 10 768 10 河中跳房子 10 2027 ------------------------------萌萌的分割线--…
Project_Lemon使用经验 如果您还没有安装Project_Lemon,那么请移步https://www.cnblogs.com/CreeperLKF/p/9201859.html去查阅安装教程 然后我们就正式开始教程. 环境配置 首先关于编译器的配置这里就不啰嗦了,可以问度娘去 然后为了方便测评,可以修改一下编译命令: 在选项的编译器下面有一个"高级"按钮,首先选中g++,然后点进去 然后下面 有一个"参数",复制其中的"编译器参数",…
Genealogical tree Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7285   Accepted: 4704   Special Judge Description The system of Martians' blood relations is confusing enough. Actually, Martians bud when they want and where they want. T…
这里提供了洛谷某些题的$special\ judge$,供需要的oier拿过去对拍. 1.P3825 #include "testlib.h" using namespace std; int n,d; ]; int m; ]; int pi,pj,hi,hj; char opt; char opt1,opt2; int main(int argc ,char* argv[]) { registerTestlibCmd(argc,argv); n=inf.readInt(); d=in…
SPJ(special judge)是个好玩的东西,毕竟各类神奇的题目SPJ经常作为救火工具(比如说一不小心出成验证类的题目). 但SPJ是个坑,毕竟只让用个“testlib.h”,输入还特别奇怪.今天我就带大家来玩一玩这个奇怪的东西 写在前面: 本来已经退役了暂时不打算补坑,但今天遇上了静静(我们教练)让我教她SPJ,于是索性把这篇文章的坑补完 一.明确内容 SPJ总体上主要分两大类:精度判断(lemon上叫实数比较)和方案验证.这两个东西其实思路完全不是一码事. 不过由于都是基于SPJ比较的…
Network Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 14021   Accepted: 5484   Special Judge Description Andrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the c…
28-大数阶乘 内存限制:64MB 时间限制:3000ms Special Judge: No accepted:19 submit:39 题目描述: 我们都知道如何计算一个数的阶乘,可是,如果这个数很大呢,我们该如何去计算它并输出它? 输入描述: 输入一个整数m(0<m<=5000) 输出描述: 输出m的阶乘,并在输出结束之后输入一个换行符 样例输入: 复制 50 样例输出: 3041409320171337804361260816606476884437764156896051200000…
2019-11-07 09:25:45 C.树之呼吸-叁之型-树上两点路径长度 Time Limit: 1000 MS Memory Limit: 32768 K Total Submit: 7 (4 users) Total Accepted: 2 (2 users) Special Judge: No Description 给一棵 n 个结点的树,结点编号从 1 到 n,并指定 m 号结点为根: 给出 q 个询问,每次询问从编号为 x 的结点到编号为 y 的结点的路径长度. Input 输…
1017 - Exact cover Time Limit: 15s Memory Limit: 128MB Special Judge Submissions: 5851 Solved: 3092 DESCRIPTION There is an N*M matrix with only 0s and 1s, (1 <= N,M <= 1000). An exact cover is a selection of rows such that every column has a 1 in e…
J 小白兔小灰兔 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K Special Judge, 64bit IO Format: %lld 题目描述 老山羊伯伯在地里收白菜,小白兔和小灰兔看见了就一起来帮忙. 他们干了半天,终于干完了. 羊伯伯:小灰兔,这车白菜送给你! 小灰兔:谢谢羊伯伯! 羊伯伯:小白兔,我也送你一车白菜! 小白兔:我不要白菜!给我一包白菜种子吧! 羊伯伯:好!给你~ 小白兔:谢谢羊伯伯~ 小灰兔把白菜拉到家里之后,就跟大家…
Marriage is Stable Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1047    Accepted Submission(s): 563Special Judge Problem Description Albert, Brad, Chuck are happy bachelors who are in love wi…
Sample Input 5 1 4 2 5 -12 4 -12 1 2 4 Sample Output 2 1 4 题目:给你两个数字序列,求出这两个序列的最长公共上升子序列.输出最长的长度,并打表输出.可能存在多种正确答案,故此题是special judge! 分析:dp[i][j] : A[1...i]和B[1...j]的公共上升子序列中以B[j]为结尾的最长的长度.如果A[i] != B[j], 则dp[i][j]=d[i-1][j]; 也就是说当前这个A[i]是没效用的.如果A[i]…
Breaking Biscuits 时间限制: 1 Sec  内存限制: 128 MB  Special Judge提交: 70  解决: 26[提交] [状态] [讨论版] [命题人:admin] 题目描述 This year, Walter’s workplace resolved to try something radically different: they’re going to change the weekly order of biscuits for the break r…
题目地址:http://poj.org/problem?id=1419 Graph Coloring Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 4468   Accepted: 2042   Special Judge Description You are to write a program that tries to find an optimal coloring for a given graph. Col…
Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6651   Accepted: 2910   Special Judge Description The input contains N natural (i.e. positive integer) numbers ( N <= 10000 ). Each of that numbers is not greater than 15000…
网络 Time Limit: 1000 MS Memory Limit: 65535 K Total Submit: 103(32 users) Total Accepted: 54(31 users) Rating: Special Judge: No Description     一个电话公司建立了一个新的电话网,他们用1——N的整数标记了一些地方,每个地方有唯一的编号,网络中的每条电缆双向连接了两个地方,从每个地方可以通过电缆连接到任意其他的地方,因为它们之间不一定要有直接相连的电缆,可…
Network Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 14103   Accepted: 5528   Special Judge Description Andrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the c…
Highways description The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already constructed a number of highways connecting som…
比如将如图中的HUSTOJ进行修改: 在Linux上修改,通过关键字搜索,会获取如下两个重要文件,找到都有的文字进行修改即可: grep -rn "HUSTOJ" * cd /home/judge/src/web vim include/db_info.inc.php 修改标题 vim template/bs3/js.php 修改底部…
B.树之呼吸-贰之型-dfs序 Time Limit: 1000 MS Memory Limit: 32768 K Total Submit: 42 (16 users) Total Accepted: 22 (15 users) Special Judge: No Description 给一棵 n 个结点的树,结点编号从 1 到 n,并指定 m 号结点为根: 请你输出这棵树长度为 2*n 的 dfs 序: 注意:在深度优先遍历面对多条分支时,请按结点编号从小到大依次遍历. Input 输入第…
Watchcow Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 9974 Accepted: 4307 Special Judge Description Bessie's been appointed the new watch-cow for the farm. Every night, it's her job to walk across the farm and make sure that no evildoer…
原文地址:http://tieba.baidu.com/p/2432943599 前言: 即将进入研二,ACM的事情也渐渐远去,记忆终将模糊,但那段奋斗永远让人热血沸腾.开个贴讲讲ACM与中南的故事,当是宣泄,也当是一种宣传吧.多年不写作文,也不知如今的文笔能否打动更多的有志青年为中南ACM梦想而奋斗. 用时间序好了,不定时更新.一层楼对应一个时期或一年,有补充就在那层楼的中.也许真写起来故事不长,就这样吧.   1947年 ACM(Association for Computing Machi…
Cena评测系统,最受欢迎的信息学竞赛离线评测系统. 它是开放源程序的信息学竞赛评测系统,能满足大多数程序设计竞赛的测评需求. 特色功能: 通过局域网自动收取选手程序. 高效率的数据文件配置工具. 自动选用对应的编译器来编译选手程序,也能使用解释器或直接评测可执行文件. 能准确测出选手程序的运行时间和内存使用量,并可加入对运行时间和内存使用的限制. 自动比较选手程序的输出和标准输出的差异,并能将两者出现差异的具体位置告诉评测者. 支持使用自定义校验器,可评测有多解的试题. 可对评测结果进行统计分…