S2OJ/judger/uoj_judger/builtin/checker/acmp.cpp
Masco Skray 96d4a3ecf7 style(judger,web): move code out from subfolder "1"
Due to historical reasons, the code is in subfolder "1".
With SVN removal, we place the code back and remove the annoying "1" folder.
2019-06-14 23:34:41 +08:00

20 lines
452 B
C++

#include "testlib.h"
#include <stdio.h>
#include <math.h>
const double EPS = 1.5E-6;
int main(int argc, char * argv[])
{
setName("compare two doubles, maximal absolute error = %.10lf", EPS);
registerTestlibCmd(argc, argv);
double ja = ans.readDouble();
double pa = ouf.readDouble();
if (fabs(ja - pa) > EPS + 1E-15)
quitf(_wa, "expected %.10lf, found %.10lf", ja, pa);
quitf(_ok, "answer is %.10lf", ja);
}